[OpenBIOS] OpenBIOS PowerPC missing open firmware commands

Alexander von Gluck kallisti5 at unixzen.com
Wed Jul 20 00:44:19 CEST 2011


On Tue, 19 Jul 2011 22:56:50 +0200, Andreas Färber wrote:
> Am 19.07.2011 um 16:12 schrieb Alexander von Gluck:
>> On Mon, 18 Jul 2011 23:39:00 -0500, Alexander von Gluck wrote:
>>> Just a few things I noticed while hacking away at Haiku on PowerPC:
>>>
>>> The following OpenFirmware commands aren't implemented:
>>>
>>> erase-screen
>>> toggle-cursor
>>
>> It does seem like these are implemented after looking at the 
>> sources.
>> However we receive the following error when they are used:
>>
>> undefined defer word toggle-cursor
>> undefined defer word erase-screen
>
> I didn't get those when I last tried, it just hung. Where do you see
> these errors?
> Please share details on what versions and command line you use. 
> Thanks!

If you skip doing the new page table...

Index: src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp
===================================================================
--- src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp	(revision 
42449)
+++ src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp	(working 
copy)
@@ -696,7 +696,8 @@
  	size_t suggestedTableSize = suggested_page_table_size(total);
  	dprintf("suggested page table size = %" B_PRIuSIZE "\n",
  		suggestedTableSize);
-	if (tableSize < suggestedTableSize) {
+	//if (tableSize < suggestedTableSize) {
+	if (0) {
  		// nah, we need a new one!
  		dprintf("need new page table, size = %" B_PRIuSIZE "!\n",
  			suggestedTableSize);


and apply this to your OpenBIOS build...

Index: arch/ppc/qemu/init.c
===================================================================
--- arch/ppc/qemu/init.c	(revision 1045)
+++ arch/ppc/qemu/init.c	(working copy)
@@ -260,6 +260,12 @@
      push_str("clock-frequency");
      fword("property");

+    //PUSH(fw_cfg_read_i32(FW_CFG_PPC_BUSFREQ));
+    PUSH(0);
+    fword("encode-int");
+    push_str("bus-frequency");
+    fword("property");
+
      push_str("running");
      fword("encode-string");
      push_str("state");



You can get all the way to the graphical splash screen for Haiku :)

You will have to press return 3 times in the boot loader menu to load 
the kernel.

qemu-system-ppc -cdrom generated/haiku-boot-cd-ppc.iso -hda 
generated/haiku.image -boot d -cpu G3 -m 512 -nographic
or
qemu-system-ppc -cdrom generated/haiku-boot-cd-ppc.iso -hda 
generated/haiku.image -boot d -cpu G3 -m 512

Thanks!
  -- Alex





More information about the OpenBIOS mailing list