Your message dated Fri, 6 Oct 2006 18:32:52 +0200
with message-id <[EMAIL PROTECTED]>
and subject line mol should run mit Tiger since 0.9.71~pre9-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: mol
Version: 0.9.70-20lxtecppc1
Severity: normal
Tags: patch



-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13.1-aragorn
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)


Please find attached patch against mol_0.9.70-20 which makes mol able to run
OSX10.4 out of linux. It is a slightly modified patch from
http://www-user.rhrk.uni-kl.de/~nissler/mol/index.html.

We also have to replace
mol-drivers-macosx-0.9.70/mollib/drivers/bootx with the one from
http://www-user.rhrk.uni-kl.de/~nissler/mol/index.html, but I don't
know how to handle patches from binaries. Tried bsdiff, but this has
to be done in the rules of mol-drivers-macosx.

Both runs well on my PowerBook5,6. I can run Tiger out of 2.6.1(2|3|4) ;-)

Thank you
Elimar

-- 
  Do you smell something burning or ist it me?
diff -Naur a/src/kmod/include/misc.h b/src/kmod/include/misc.h
--- a/src/kmod/include/misc.h   2005-09-17 13:48:21.163720000 +0200
+++ b/src/kmod/include/misc.h   2005-09-17 13:48:44.296972527 +0200
@@ -80,6 +80,14 @@
        *p &= ~mask;
 }
 
+static inline int 
+check_bit_mol( int nr, char *addr )
+{
+       ulong mask = 1 << (nr & 0x1f);
+       ulong *p = ((ulong*)addr) + (nr >> 5);
+       return (*p & mask) != 0;
+}
+
 /* typesafe min/max (stolen from kernel.h) */
 #define min_mol(x,y) ({ \
         const typeof(x) _x = (x);       \
diff -Naur a/src/kmod/ptaccess.c b/src/kmod/ptaccess.c
--- a/src/kmod/ptaccess.c       2004-03-21 02:24:35.000000000 +0100
+++ b/src/kmod/ptaccess.c       2005-09-17 13:48:44.292972484 +0200
@@ -22,6 +22,7 @@
 #include "performance.h"
 
 extern int do_intercept_tlbie( kernel_vars_t *kv, ulong pte0, ulong pte1, 
ulong pteoffs );
+extern int do_intercept_tlbie_block( kernel_vars_t *kv, ulong pteoffs, ulong 
length );
 
 #define        MMU     (kv->mmu)
 #define        MREGS   (kv->mregs)
@@ -49,6 +50,37 @@
        return RVEC_NOP;
 }
 
+int
+do_intercept_tlbie_block( kernel_vars_t *kv, ulong pteoffs, ulong length )
+{
+       unsigned int finish;
+
+       //printk("do_intercept_tlbie_block: pteoffs %08lX length %08lX\n", 
pteoffs, length);
+
+       if (pteoffs + length > MMU.hash_mask) {
+               printk("do_intercept_tlbie_block: length exceeding hash!\n");
+               finish = MMU.hash_mask + 1;
+       } else
+               finish = pteoffs + length;
+
+       if (MMU.pthash_inuse_bits == NULL)
+               return RVEC_NOP;
+
+       while (pteoffs < finish) {
+               if (check_bit_mol(pteoffs >> 3, MMU.pthash_inuse_bits)) {
+                       ulong pte0, pte1;
+
+                       pte0 = *((unsigned int *) (MMU.hash_base + pteoffs));
+                       pte1 = *((unsigned int *) (MMU.hash_base + pteoffs + 
4));
+                       do_intercept_tlbie(kv, pte0, pte1, pteoffs);
+               } 
+
+               pteoffs += 8;
+       }
+
+       return RVEC_NOP;
+}
+
 #ifdef EMULATE_603
 
 extern int do_tlbli( kernel_vars_t *kv, ulong ea );
diff -Naur a/src/kmod/ptintercept.S b/src/kmod/ptintercept.S
--- a/src/kmod/ptintercept.S    2004-03-21 02:24:35.000000000 +0100
+++ b/src/kmod/ptintercept.S    2005-09-17 13:48:44.293972495 +0200
@@ -157,7 +157,6 @@
 do_stfiw:
 do_stswi:
 do_stswx:
-do_stmw:
        lwz     r6,xNIP(r1)
        DEBUGGER_SAVE(0x1882)                   // unimplemented store 
instruction
 
@@ -258,3 +257,47 @@
        // r4=PTE0, r5=PTE1
        LOADI   r3,EXTERN(do_intercept_tlbie)
        b       call_kernel
+
+       // stmw uses another emulator entry point because it might overwrite a 
bunch of PTEs
+do_stmw:
+       mtlr    r4
+
+       // save some debugging info
+//     stw     r2,xDBG_TRACE_SPACE(r1)
+
+       SET_MSR_DR /**/ r6
+
+       // now do the stmw. we do that manually since we have to access 
emulator regs.
+       mr      r4,r2                           // r4: memory pointer
+       srwi    r6,r5,3                         // r6: rS
+1:     cmpwi   r5,32 << 3                      // loop condition
+       bge     2f
+       EMU_LOAD_GPR r5, /**/ R3                // r0 = value
+       stw     r0,0(r4)                        // store the value
+       addi    r5,r5,1 << 3                    // update register counter
+       addi    r4,r4,4                         // and memory pointer
+       b       1b
+
+2:     CLEAR_MSR_DR /**/ r0
+
+       // load up r4 and r5 for do_intercept_tlbie_block (see below)
+       subfic  r5,r6,32                        // number of registers (=words) 
stored
+       slwi    r5,r5,2                         // number of bytes stored
+       add     r4,r2,r5                        // last byte stored
+       addi    r4,r4,7                         // alignment to
+       rlwinm  r5,r4,0,~0x7                    // PTE size
+       rlwinm  r4,r2,0,~0x7                    // pte block pointer
+       sub     r5,r5,r4                        // substract block pointer -> 
length (in bytes)
+       lwz     r3,K_TLBHASH_BASE_EA(r1)        // calculate tlb offset
+       sub     r4,r4,r3                        // tlb offset
+       b       st_block_continue
+
+       // transfer to C-function [r2=dar, r4=pte block offset, r5=pte block 
length]
+st_block_continue:
+       BUMP("pt_intercept_taken")
+       lwz     r6,xNIP(r1)
+       addi    r6,r6,4                         // inc NIP
+       bl      save_middle_regs
+
+       LOADI   r3,EXTERN(do_intercept_tlbie_block)
+       b       call_kernel

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Hi

The current version of MOL in unstable should run with Tiger.

Gaudenz

-- 
Ever tried. Ever failed. No matter.
Try again. Fail again. Fail better.
~ Samuel Beckett ~

--- End Message ---

Reply via email to