[haiku-commits] BRANCH mmu_man-github.sam460ex [91c5579] src/system/kernel/arch/ppc

  • From: mmu_man-github.sam460ex <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 21 Dec 2013 15:00:31 +0100 (CET)

added 3 changesets to branch 'refs/remotes/mmu_man-github/sam460ex'
old head: 73bab8195891ab7f9025a7e89ff255efd8dbe0b7
new head: 91c55794d487a3489ed8ba9a0e5a17ef466b338a
overview: https://github.com/mmuman/haiku/compare/73bab81...91c5579

----------------------------------------------------------------------------

d286638: ppc: rename arch_exceptions_44x.S to arch_exceptions_440.S

4f13a07: PPC: compile arch_exception*.S in cpu-specific objects

91c5579: PPC: s/44x/440/

                                          [ François Revol <revol@xxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 24 insertions(+), 22 deletions(-)
src/system/kernel/arch/ppc/Jamfile               |  8 +++--
...ch_exceptions_44x.S => arch_exceptions_440.S} | 38 ++++++++++----------

############################################################################

Commit:      d28663834d742ad3102b3ce726af500ab51525eb
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Dec 21 13:38:48 2013 UTC

ppc: rename arch_exceptions_44x.S to arch_exceptions_440.S

----------------------------------------------------------------------------

diff --git a/src/system/kernel/arch/ppc/Jamfile 
b/src/system/kernel/arch/ppc/Jamfile
index 9d1bfa4..1a7a601 100644
--- a/src/system/kernel/arch/ppc/Jamfile
+++ b/src/system/kernel/arch/ppc/Jamfile
@@ -40,7 +40,7 @@ KernelMergeObject kernel_arch_ppc.o :
        arch_debug.cpp
        arch_elf.cpp
        arch_exceptions.S
-       arch_exceptions_44x.S
+       arch_exceptions_440.S
        arch_int.cpp
        arch_mmu.cpp
        arch_platform.cpp
diff --git a/src/system/kernel/arch/ppc/arch_exceptions_44x.S 
b/src/system/kernel/arch/ppc/arch_exceptions_440.S
similarity index 100%
rename from src/system/kernel/arch/ppc/arch_exceptions_44x.S
rename to src/system/kernel/arch/ppc/arch_exceptions_440.S

############################################################################

Commit:      4f13a07b707605094023dac82fbf2396c2a0c713
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Dec 21 13:51:09 2013 UTC

PPC: compile arch_exception*.S in cpu-specific objects

----------------------------------------------------------------------------

diff --git a/src/system/kernel/arch/ppc/Jamfile 
b/src/system/kernel/arch/ppc/Jamfile
index 1a7a601..b535e96 100644
--- a/src/system/kernel/arch/ppc/Jamfile
+++ b/src/system/kernel/arch/ppc/Jamfile
@@ -10,6 +10,8 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) paging classic ] ;
 # cpu-specific stuff
 KernelMergeObject arch_ppc_classic.o :
 
+       arch_exceptions.S
+
        # paging/classic
        PPCPagingMethodClassic.cpp
        PPCPagingStructuresClassic.cpp
@@ -21,7 +23,8 @@ KernelMergeObject arch_ppc_classic.o :
 
 KernelMergeObject arch_ppc_460.o :
 
-       # TODO: compile with correct -mcpu
+       arch_exceptions_440.S
+
        # paging/460
        #PPCPagingMethod460.cpp
        #PPCPagingStructures460.cpp
@@ -39,8 +42,6 @@ KernelMergeObject kernel_arch_ppc.o :
        arch_debug_console.cpp
        arch_debug.cpp
        arch_elf.cpp
-       arch_exceptions.S
-       arch_exceptions_440.S
        arch_int.cpp
        arch_mmu.cpp
        arch_platform.cpp
@@ -69,6 +70,7 @@ KernelMergeObject kernel_arch_ppc.o :
        $(TARGET_KERNEL_PIC_CCFLAGS) -Wno-unused
        :
        arch_ppc_classic.o
+       arch_ppc_460.o
 ;
 
 CreateAsmStructOffsetsHeader asm_offsets.h : asm_offsets.cpp ;

############################################################################

Commit:      91c55794d487a3489ed8ba9a0e5a17ef466b338a
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Dec 21 13:51:58 2013 UTC

PPC: s/44x/440/

----------------------------------------------------------------------------

diff --git a/src/system/kernel/arch/ppc/arch_exceptions_440.S 
b/src/system/kernel/arch/ppc/arch_exceptions_440.S
index c533bca..d8364ab 100644
--- a/src/system/kernel/arch/ppc/arch_exceptions_440.S
+++ b/src/system/kernel/arch/ppc/arch_exceptions_440.S
@@ -25,8 +25,8 @@
        algorithm overview:
 
        * VEC_ENTRY
-       * ppc_44x_exception_vector_common
-       * ppc_44x_exception_tail
+       * ppc_440_exception_vector_common
+       * ppc_440_exception_tail
                - dump iframe
                - ppc_exception_entry()
                - restore registers and return from interrupt
@@ -49,7 +49,7 @@
        * VEC_ENTRY
                - save r1 in SPRG1 and load cpu_exception_context into r1
                - save r0, save LR in r0
-       * ppc_44x_exception_vector_common
+       * ppc_440_exception_vector_common
                - params:
                        . r0: old LR
                        . r1: exception context (physical address)
@@ -59,7 +59,7 @@
                - turn on BAT for exception vector code
                - turn on address translation
                - get exception vector offset from LR
-       * ppc_44x_exception_tail
+       * ppc_440_exception_tail
                - params:
                        . r1: exception context (virtual address)
                        . r3: exception vector offset
@@ -80,17 +80,17 @@
        mfsprg0 %r1                                     ; /* 
ppc_cpu_exception_context* -> r1 */        \
        stw             %r0, 16(%r1)            ; /* save r0 */                 
                                        \
        mflr    %r0                                     ; /* save LR in r0 */   
                                        \
-       bl              ppc_44x_exception_vector_common ; /* continue with the 
common part */
+       bl              ppc_440_exception_vector_common ; /* continue with the 
common part */
 
 /* defines an exception vector */
 #define DEFINE_VECTOR(offset, name)    \
-.skip  offset - (. - __44x_irqvec_start);      \
-FUNCTION(ppc_44x_##name):                                                      
\
+.skip  offset - (. - __440_irqvec_start);      \
+FUNCTION(ppc_440_##name):                                                      
\
        VEC_ENTRY()
 
 
-.global __44x_irqvec_start
-__44x_irqvec_start:
+.global __440_irqvec_start
+__440_irqvec_start:
        .long   0
 
 /* Called by the exception vector code.
@@ -99,7 +99,7 @@ __44x_irqvec_start:
  * r1:    ppc_cpu_exception_context* (physical address)
  * SPRG1: original r1
  */
-ppc_44x_exception_vector_common:
+ppc_440_exception_vector_common:
        stw             %r0, 20(%r1)                    /* save original LR */
        stw             %r2, 24(%r1)                    /* save r2 */
        stw             %r3, 28(%r1)                    /* save r3 */
@@ -159,16 +159,16 @@ DEFINE_VECTOR(0x1400, system_management_exception)
 DEFINE_VECTOR(0x1600, altivec_assist_exception)
 DEFINE_VECTOR(0x1700, thermal_management_exception)
 
-.global __44x_irqvec_end
-__44x_irqvec_end:
+.global __440_irqvec_end
+__440_irqvec_end:
 
 
-/* This is where ppc_44x_exception_vector_common continues. We're in the 
kernel here.
+/* This is where ppc_440_exception_vector_common continues. We're in the 
kernel here.
    r1:    ppc_cpu_exception_context* (virtual address)
    r3:    exception vector offset
    SPRG1: original r1
  */
-FUNCTION(ppc_44x_exception_tail):
+FUNCTION(ppc_440_exception_tail):
        /* turn off BAT */
        li              %r2, 0
        mtibatu 0, %r2
@@ -202,7 +202,7 @@ FUNCTION(ppc_44x_exception_tail):
        rlwinm  %r1, %r1, 0, 0, 28
 
        /* save the registers */
-       bl              __44x_save_regs
+       bl              __440_save_regs
 
        /* iframe pointer to r4 and a backup to r20 */
        mr              %r4, %r1
@@ -224,10 +224,10 @@ FUNCTION(ppc_44x_exception_tail):
        /* move the iframe to r1 */
        mr              %r1, %r20
 
-       b               __44x_restore_regs_and_rfi
+       b               __440_restore_regs_and_rfi
 
 
-/* called by ppc_44x_exception_tail
+/* called by ppc_440_exception_tail
  * register expectations:
  *  r1:        stack
  *  r2:        ppc_cpu_exception_context*
@@ -236,7 +236,7 @@ FUNCTION(ppc_44x_exception_tail):
  * all other regs should have been unmodified by the exception handler,
  * and ready to be saved
  */
-__44x_save_regs:
+__440_save_regs:
        /* Note: The iframe must be 8 byte aligned. The stack pointer we are 
passed
           in r1 is aligned. So we store the floating point registers first and
           need to take care that an even number of 4 byte registers is stored,
@@ -344,7 +344,7 @@ __44x_save_regs:
 /* called at the tail end of each of the exceptions
  * r1: iframe pointer
  */
-__44x_restore_regs_and_rfi:
+__440_restore_regs_and_rfi:
        lwzu    %r0, 4(%r1)             /* SRR0 (skip vector offset) */
        mtspr   %srr0, %r0
        lwzu    %r0, 4(%r1)             /* SRR1 */


Other related posts:

  • » [haiku-commits] BRANCH mmu_man-github.sam460ex [91c5579] src/system/kernel/arch/ppc - mmu_man-github . sam460ex