[haiku-commits] BRANCH mmu_man-github.sam460ex [4c7a310] in src/system: boot/platform/openfirmware/arch/ppc kernel/arch/ppc

  • From: mmu_man-github.sam460ex <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 21 Oct 2013 15:00:34 +0200 (CEST)

added 2 changesets to branch 'refs/remotes/mmu_man-github/sam460ex'
old head: 3940abc9b851f133d7679fcf162f4393456ba192
new head: 4c7a310ce1b0bdc98f2b712e2ae20540d6886bfb
overview: https://github.com/mmuman/haiku/compare/3940abc...4c7a310

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

b96e57e: Fix typo

4c7a310: OF: PPC: Check for bus-frequency on '/' first
  
  As per PowerPC IEEE 1275-1994 binding v1.8 page 13.

                                          [ François Revol <revol@xxxxxxx> ]

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

2 files changed, 14 insertions(+), 3 deletions(-)
.../boot/platform/openfirmware/arch/ppc/cpu.cpp       | 15 +++++++++++++--
.../kernel/arch/ppc/arch_vm_translation_map.cpp       |  2 +-

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

Commit:      b96e57e8853e11d9bf6df0a7f61d452c4a0be5d0
Author:      François Revol <revol@xxxxxxx>
Date:        Sat Oct 19 14:06:41 2013 UTC

Fix typo

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

diff --git a/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp 
b/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp
index 3eb31e3..f045583 100644
--- a/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp
+++ b/src/system/kernel/arch/ppc/arch_vm_translation_map.cpp
@@ -793,7 +793,7 @@ status_t
 arch_vm_translation_map_early_query(addr_t va, phys_addr_t *out_physical)
 {
        //PANIC_UNIMPLEMENTED();
-       panic("vm_translation_map_quick_query(): not yet implemented\n");
+       panic("vm_translation_map_early_query(): not yet implemented\n");
        return B_OK;
 }
 

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

Commit:      4c7a310ce1b0bdc98f2b712e2ae20540d6886bfb
Author:      François Revol <revol@xxxxxxx>
Date:        Sun Oct 20 18:53:06 2013 UTC

OF: PPC: Check for bus-frequency on '/' first

As per PowerPC IEEE 1275-1994 binding v1.8 page 13.

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

diff --git a/src/system/boot/platform/openfirmware/arch/ppc/cpu.cpp 
b/src/system/boot/platform/openfirmware/arch/ppc/cpu.cpp
index 66aedf6..a2a4b2a 100644
--- a/src/system/boot/platform/openfirmware/arch/ppc/cpu.cpp
+++ b/src/system/boot/platform/openfirmware/arch/ppc/cpu.cpp
@@ -26,6 +26,17 @@
 status_t
 boot_arch_cpu_init(void)
 {
+       int32 busFrequency = 0;
+
+       int root = of_finddevice("/");
+       if (root == OF_FAILED) {
+               printf("boot_arch_cpu_init(): Failed to open \"/\"!\n");
+               return B_ERROR;
+       }
+
+       of_getprop(root, "clock-frequency", &busFrequency, 4);
+               // we might find it in /cpus instead
+
        // iterate through the "/cpus" node to find all CPUs
        int cpus = of_finddevice("/cpus");
        if (cpus == OF_FAILED) {
@@ -58,8 +69,8 @@ boot_arch_cpu_init(void)
                                        "frequency!\n");
                                return B_ERROR;
                        }
-                       int32 busFrequency;
-                       if (of_getprop(cpu, "bus-frequency", &busFrequency, 4)
+                       if (busFrequency == 0
+                               && of_getprop(cpu, "bus-frequency", 
&busFrequency, 4)
                                        == OF_FAILED) {
                                printf("boot_arch_cpu_init: Failed to get bus 
clock "
                                        "frequency!\n");


Other related posts:

  • » [haiku-commits] BRANCH mmu_man-github.sam460ex [4c7a310] in src/system: boot/platform/openfirmware/arch/ppc kernel/arch/ppc - mmu_man-github . sam460ex