]> git.saurik.com Git - apple/xnu.git/commitdiff
xnu-344.32.tar.gz mac-os-x-1025 v344.32
authorApple <opensource@apple.com>
Thu, 14 Aug 2003 01:10:02 +0000 (01:10 +0000)
committerApple <opensource@apple.com>
Thu, 14 Aug 2003 01:10:02 +0000 (01:10 +0000)
34 files changed:
bsd/conf/version.minor
bsd/hfs/hfs_readwrite.c
bsd/kern/sysctl_init.c
bsd/net/if.c
bsd/netinet/tcp_input.c
bsd/netinet/tcp_output.c
bsd/netinet/tcp_var.h
bsd/netinet6/ipsec.c
bsd/nfs/nfs_socket.c
bsd/vfs/vfs_syscalls.c
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/KernelConfigTables.cpp
iokit/conf/version.minor
libkern/conf/version.minor
libsa/conf/version.minor
osfmk/conf/kernelversion.minor
osfmk/conf/version.minor
osfmk/default_pager/dp_backing_store.c
osfmk/default_pager/dp_memory_object.c
osfmk/ppc/Emulate.s
osfmk/ppc/asm.h
osfmk/ppc/machine_routines.h
osfmk/ppc/machine_routines_asm.s
osfmk/ppc/start.s
pexpert/conf/version.minor

index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5
index 6f0311411a8af16e6a32141c64f3c232562ea658..e7fba04137416943204f3ba9c723f0c69dc798a3 100644 (file)
@@ -998,6 +998,7 @@ hfs_cmap(ap)
                return (0);
 
        p = current_proc();
+  retry:
        if (fp->ff_unallocblocks) {
                lockExtBtree = 1;
 
@@ -1036,6 +1037,22 @@ 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 3b659c97ebc1e0a02d5e8fa83ecf3f6b8dfbc523..053633063c147d4027b78b5ee8c18814cca582f3 100644 (file)
@@ -115,6 +115,7 @@ 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;
@@ -442,6 +443,7 @@ 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 17213f3dbd3d454df8cf1b633c9a812aa77da3b2..094210bce7689747b368f732b8d12a042f4558c8 100644 (file)
@@ -1394,6 +1394,6 @@ void if_rtproto_del(struct ifnet *ifp, int protocol)
        
         struct radix_node_head  *rnh;
 
-       if (((rnh = rt_tables[protocol]) != NULL) && (ifp != NULL)) 
+       if ((protocol <= AF_MAX) && ((rnh = rt_tables[protocol]) != NULL) && (ifp != NULL))
                (void) rnh->rnh_walktree(rnh, if_rtdel, ifp);
 }
index eb294a6a2a7f16b41e382f91dde0451772af861d..74493fdb740ded65aa26b04a76e5748172ecf82c 100644 (file)
@@ -71,6 +71,7 @@
 #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>
@@ -158,6 +159,11 @@ 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 */
@@ -1135,6 +1141,10 @@ 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));
        }
 
@@ -1317,7 +1327,10 @@ findpcb:
                         * here.  Even if we requested window scaling, it will
                         * become effective only later when our SYN is acked.
                         */
-                       tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN);
+                       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);
                        tcpstat.tcps_connects++;
                        soisconnected(so);
                        tp->t_timer[TCPT_KEEP] = tcp_keepinit;
@@ -2116,10 +2129,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) {
 
@@ -2841,6 +2854,16 @@ 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);
@@ -3047,6 +3070,16 @@ 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 d3e5558d3b0bffd068c7a4320238411df2ddfe1b..1eabf75c489827695c12cb6cdeffb45bf5c9baf2 100644 (file)
@@ -113,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 = TCP_MAXWIN;               /* something large */
+int ss_fltsz_local = 4; /* starts with four segments max */
 SYSCTL_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, CTLFLAG_RW,
        &ss_fltsz_local, 1, "Slow start flight size for local networks");
 
@@ -129,6 +129,8 @@ 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.
  */
@@ -219,6 +221,8 @@ 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];
        /*
@@ -325,7 +329,10 @@ again:
        if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc))
                flags &= ~TH_FIN;
 
-       win = sbspace(&so->so_rcv);
+       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);
 
        /*
         * Sender silly window avoidance.  If connection is idle
@@ -795,9 +802,17 @@ send:
                win = 0;
        if (win < (long)(tp->rcv_adv - tp->rcv_nxt))
                win = (long)(tp->rcv_adv - tp->rcv_nxt);
-       if (win > (long)TCP_MAXWIN << tp->rcv_scale)
+       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)
                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 5c1742366789e8178d0d88f7998d0ed21356462a..80bf16e9aac51ed963df1226c0645b8c988e26cf 100644 (file)
@@ -127,6 +127,7 @@ 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 9991df62f19ef2a298d33c8bd6c4ed203e6c4c81..5c14febecad3f4dc5a3242fcc0215099fb542165 100644 (file)
@@ -3384,7 +3384,7 @@ ipsec_copypkt(m)
                         */
                        if (
                                n->m_ext.ext_free ||
-                               mclrefcnt[mtocl(n->m_ext.ext_buf)] > 1
+                               m_mclhasreference(n)
                            )
                        {
                                int remain, copied;
index 8038b43a62d58d45d924f75fbed8e3b23f10c700..1c61f9d7a1c63535b9e583fa037717ab56507e21 100644 (file)
@@ -993,6 +993,10 @@ 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??
                         */
@@ -1996,9 +2000,17 @@ static int
 nfs_rcvlock(rep)
        register struct nfsreq *rep;
 {
-       register int *flagp = &rep->r_nmp->nm_flag;
+       register int *flagp;
        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 b76cdabb212099241e7d7ed2c9300d9d6742c140..02027a104f491512a212a19ccdd093d50b022b04 100644 (file)
@@ -143,24 +143,28 @@ mount(p, uap, retval)
                        return (EINVAL);
                }
                mp = vp->v_mount;
-               flag = mp->mnt_flag;
+
+               if (vfs_busy(mp, LK_NOWAIT, 0, p)) {
+                       vput(vp);
+                       return (EBUSY);
+               }
                /*
                 * 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);
                }
@@ -171,18 +175,21 @@ 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 (flag & MNT_NOEXEC)
+                       if (mp->mnt_flag & MNT_NOEXEC)
                                uap->flags |= MNT_NOEXEC;
                }
-               if (vfs_busy(mp, LK_NOWAIT, 0, p)) {
-                       vput(vp);
-                       return (EBUSY);
-               }
+               flag = mp->mnt_flag;
+
+               mp->mnt_flag |=
+                   uap->flags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE);
+
                VOP_UNLOCK(vp, 0, p);
+
                goto update;
        }
        /*
@@ -296,7 +303,8 @@ update:
         * Mount the filesystem.
         */
        error = VFS_MOUNT(mp, uap->path, uap->data, &nd, p);
-       if (mp->mnt_flag & MNT_UPDATE) {
+
+       if (uap->flags & MNT_UPDATE) {
                vrele(vp);
                if (mp->mnt_kern_flag & MNTK_WANTRDWR)
                        mp->mnt_flag &= ~MNT_RDONLY;
@@ -324,6 +332,7 @@ 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);
@@ -544,6 +553,7 @@ 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;
index de657ff35b26f010b3a04bcbf6626462442763ff..bcb99c4b7fb7bca3ddabb75ed2e58c0fa6ea2399 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>System Resource Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>System Resource Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleRequired</key>
        <string>Root</string>
        <key>OSKernelResource</key>
index f6652f8dfb269d0a266fc54678c5c17be90a8c64..e0f769f9bd357a895c6229c69ffb026d4edbc481 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.driver.AppleNMI</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleRequired</key>
        <string>Root</string>
        <key>OSKernelResource</key>
index 3813bf303d0e8a2389b8065f547034214ee5b474..dbc9902034abf3179650fd9e2ded830060af1d81 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>Apple Platform Family Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>Apple Platform Family Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.ApplePlatformFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0</string>
        <key>OSBundleRequired</key>
index 62fae78b395c646db27c781aa3e9faea5738f9da..83b9aa7905fd35b13aef4b68f44ed9038f8d6aed 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>BSD Kernel Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>BSD Kernel Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.bsd</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.1</string>
        <key>OSBundleRequired</key>
index c374e45c10c33a30206108aee94030df28cd866b..5fea1efd9f623ae983e81ae5e7c5394c718fa85c 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>ADB Family Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>ADB Family Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.IOADBFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 8e99c49eb2fd5670c85e27282abae6d51cfd11ac..779252504e7582b3c2bd0966fd0ebec81c9caa75 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>I/O Kit Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>I/O Kit Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.iokit</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 95b388dddcd3df520dc6f7d2d14e5bf162d353f9..513e2a627111f07ed4b54dd949d674cb7f2df3d0 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.IONVRAMFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.1</string>
        <key>OSBundleRequired</key>
index 6dbf1ab02bb1f4ede3b3f0cf99b763df9eac5d5f..896ae740835c077eb40d5ede89b393013523e3d3 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>System Management Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>System Management Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.IOSystemManagementFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index c1eaea03850870926655d9dd4ff1655601cfd36c..2f2f4c55f54a0b7fd096ebbd07b78747e65c5d5f 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>Libkern Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>Libkern Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.libkern</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 8a9bf2ce243b1645b42c031676f629fb21c8804b..69ed2ddb8eecd5aa2ad5605deb2be0b453615b2b 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>Mach Kernel Pseudoextension, Apple Computer Inc, 6.4</string>
+       <string>Mach Kernel Pseudoextension, Apple Computer Inc, 6.5</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.mach</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.4</string>
+       <string>6.5</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 741d8c448da6c8dccdccd368ec7f54dd8cdb1fe1..85db1be743793e7b11552d62289a61061af9fda3 100644 (file)
  */
 const char * gIOKernelKmods =
 "{
-    'com.apple.kernel'                         = '6.4';
-    'com.apple.kernel.bsd'                     = '6.4';
-    'com.apple.kernel.iokit'                   = '6.4';
-    'com.apple.kernel.libkern'                 = '6.4';
-    'com.apple.kernel.mach'                    = '6.4';
-    'com.apple.iokit.IOADBFamily'              = '6.4';
-    'com.apple.iokit.IONVRAMFamily'            = '6.4';
-    'com.apple.iokit.IOSystemManagementFamily' = '6.4';
-    'com.apple.iokit.ApplePlatformFamily'      = '6.4';
-    'com.apple.driver.AppleNMI'                = '6.4';
+    'com.apple.kernel'                         = '6.5';
+    'com.apple.kernel.bsd'                     = '6.5';
+    'com.apple.kernel.iokit'                   = '6.5';
+    'com.apple.kernel.libkern'                 = '6.5';
+    'com.apple.kernel.mach'                    = '6.5';
+    'com.apple.iokit.IOADBFamily'              = '6.5';
+    'com.apple.iokit.IONVRAMFamily'            = '6.5';
+    'com.apple.iokit.IOSystemManagementFamily' = '6.5';
+    'com.apple.iokit.ApplePlatformFamily'      = '6.5';
+    'com.apple.driver.AppleNMI'                = '6.5';
 }";
 
 
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5
index 112ced6c62ba39b9a223a106e8ffaf8be7a97b59..56985986c1a542575bf7a6a1d9592b592eb0bd52 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
@@ -2550,10 +2549,16 @@ pvs_cluster_read(
                int     ps_info_valid;
                int     page_list_count;
 
-               if (cnt > VM_SUPER_CLUSTER)
+               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) {
                        size = VM_SUPER_CLUSTER;
-               else
+               } else {
                        size = cnt;
+               }
                cnt -= size;
 
                ps_info_valid = 0;
@@ -2658,9 +2663,11 @@ 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;
@@ -2672,35 +2679,43 @@ 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;
                        }
@@ -2711,68 +2726,78 @@ 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;
                                                }
                                        }
@@ -2780,12 +2805,13 @@ 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(failed_size));
+                                       psp[beg_pseg]->ps_bs->bs_pages_in_fail 
+                                               += atop(failed_size));
                        }
                        size       -= xfer_size;
                        vs_offset  += xfer_size;
@@ -2869,12 +2895,14 @@ vs_cluster_write(
 
                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);
@@ -2891,21 +2919,25 @@ 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;
@@ -2927,14 +2959,16 @@ 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++;
                                /*
@@ -2946,17 +2980,21 @@ 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;
                                        }
                                }
@@ -2970,22 +3008,29 @@ 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);
 
-                               if (error == 0) {
-                                       while (transfer_size) {
-                                               int seg_size;
+                               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) {
@@ -3028,14 +3073,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;
index 74c1e12dae524947f91ae3129acc7670d2ead1d4..da49b7bf886e235d8cd1f1361c97fea6ab22abe3 100644 (file)
@@ -730,7 +730,9 @@ dp_memory_object_data_return(
                return KERN_SUCCESS;
        }
 
-       if ((vs->vs_seqno != vs->vs_next_seqno++) || (vs->vs_xfer_pending)) {
+       if ((vs->vs_seqno != vs->vs_next_seqno++)
+                       || (vs->vs_readers)
+                       || (vs->vs_xfer_pending)) {
                upl_t   upl;
                int     page_list_count = 0;
 
index 419b24747393a5590855100cbd39d51700673fdf..b05eb99ba9ee2a85d09d18214b190b4762b85551 100644 (file)
@@ -1127,7 +1127,7 @@ aaSetSegs:        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
                        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
+                       addi    r7,r7,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
index e12d9bfe1274f11665d4c9375deb923acc34bbe9..9233eb4dd694578f24c6ec4d004639d3a5f92b21 100644 (file)
 #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 hid1pc0                0x0000F800
 #define hid1pr1                0x00000006
 
+
+;      hid2 bits
+#define hid2vmin       18
+#define hid2vminm      0x00002000
+
 ;      msscr0 bits
 #define shden  0
 #define shdenm 0x80000000
index dc0cef117d8401caac242832a0735c8e20846fda..ff4b5e34b031334bda60fd2b290ec55a49a84181 100644 (file)
@@ -201,6 +201,7 @@ typedef struct ml_ppc_cpu_info_t ml_ppc_cpu_info_t;
 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 436307c24b39389929af8f27ebbbb660a41d07d1..471389e4260f528751f5d50ee07a8a76d95d64a8 100644 (file)
@@ -1338,3 +1338,18 @@ 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 12714d5515261b21e82febce436b9c5e1009f844..6ad6a1e4cca464d9fe7fffef28c9c6632c768504 100644 (file)
@@ -524,6 +524,21 @@ 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...
@@ -857,6 +872,21 @@ processor_types:
        .long   32*1024
        .long   32*1024
        
+;       750FX (ver 1.x)
+
+        .align  2
+        .long   0xFFFF0F00              ; 1.x vers
+        .short  PROCESSOR_VERSION_750FX
+        .short  0x0100
+        .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
+       
 ;       750FX (generic)
 
         .align  2
@@ -864,7 +894,7 @@ processor_types:
         .short  PROCESSOR_VERSION_750FX
         .short  0
         .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfSlowNap | pfNoMuMMCK | pfL1i | pfL1d | pfL2
-        .long   init750FX
+        .long   init750FXV2
         .long   CPU_SUBTYPE_POWERPC_750
         .long   105
         .long   90
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5