[haiku-commits] Change in haiku[master]: sparc: Build fixes

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 30 Dec 2020 21:51:34 +0000

From Adrien Destugues <pulkomandy@xxxxxxxxx>:

Adrien Destugues has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3571 ;)


Change subject: sparc: Build fixes
......................................................................

sparc: Build fixes

- Wrong printf format in bootloader elf panic call
- Missing functions for sparc
---
M src/system/boot/loader/elf.cpp
M src/system/boot/platform/openfirmware/mmu.cpp
2 files changed, 17 insertions(+), 1 deletion(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/71/3571/1

diff --git a/src/system/boot/loader/elf.cpp b/src/system/boot/loader/elf.cpp
index fd4655d..99495aa 100644
--- a/src/system/boot/loader/elf.cpp
+++ b/src/system/boot/loader/elf.cpp
@@ -152,7 +152,7 @@
 #else
                void *result;
                if (platform_kernel_address_to_bootloader_address(address, 
&result) != B_OK) {
-                       panic("Couldn't convert address %#lx", address);
+                       panic("Couldn't convert address %#" PRIx64, address);
                }
                return result;
 #endif
diff --git a/src/system/boot/platform/openfirmware/mmu.cpp 
b/src/system/boot/platform/openfirmware/mmu.cpp
index b765e8d..4f47608 100644
--- a/src/system/boot/platform/openfirmware/mmu.cpp
+++ b/src/system/boot/platform/openfirmware/mmu.cpp
@@ -28,6 +28,22 @@
 }


+extern "C" status_t
+platform_bootloader_address_to_kernel_address(void *address, addr_t *_result)
+{
+       *_result = (addr_t)address;
+       return B_OK;
+}
+
+
+extern "C" status_t
+platform_kernel_address_to_bootloader_address(addr_t address, void **_result)
+{
+       *_result = (void*)address;
+       return B_OK;
+}
+
+
 status_t
 platform_free_region(void *address, size_t size)
 {

--
To view, visit https://review.haiku-os.org/c/haiku/+/3571
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I4715a8d6d3d864d379b8386dc3958e0a2c1962e7
Gerrit-Change-Number: 3571
Gerrit-PatchSet: 1
Gerrit-Owner: Adrien Destugues <pulkomandy@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: sparc: Build fixes - Gerrit