Segher Boessenkool | 9 May 2013 02:08

Re: Patch that allows for building OpenBIOS on Mac OS X!

>>> archname()
>>> {
>>> -    HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
>>> -	-e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
>>> -	-e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
>>> -	-e "s/Power Macintosh/ppc/"`
>>> + 	OS_NAME=`uname`
>>> +	if test "$OS_NAME" = "Darwin"; then     # Can't depend on uname  
>>> -m on Mac OS X
>>> +		IS_64BIT=`sysctl hw.cpu64bit_capable`
>>> +		if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then
>>> +			HOSTARCH="amd64"
>>> +		else
>>> +			HOSTARCH="x86"
>>> +		fi
>>> +	else
>>> +		 HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
>>> +		-e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
>>> +		-e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
>>> +		-e "s/Power Macintosh/ppc/"`
>>> +	fi
>>> }
>>
>> This is wrong.  "uname" does not tell you the machine architecture;
>> "uname -m" does, at least on my PowerPC Macs.  Also:
>
> Who said I was trying to obtain the machine architecture?

That is what this function does.

(Continue reading)

Programmingkid | 8 May 2013 01:54
Picon

[PATCH] Building OpenBIOS on Mac OS X


This patch allows for building OpenBIOS on Mac OS X, but without the "Trying" output. It has been tested on
Mac OS 10.6 and Debian Linux.

signed-off-by: John Arbuckle <programmingkidx@...>

Index: trunk/openbios-devel/config/scripts/switch-arch
===================================================================
--- trunk/openbios-devel/config/scripts/switch-arch	(revision 1133)
+++ trunk/openbios-devel/config/scripts/switch-arch	(working copy)
 <at>  <at>  -89,15 +89,25  <at>  <at> 

 archname()
 {
-    HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
-	-e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
-	-e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
-	-e "s/Power Macintosh/ppc/"`
+ 	OS_NAME=`uname`
+	if test "$OS_NAME" = "Darwin"; then     # Can't depend on uname -m on Mac OS X
+		IS_64BIT=`sysctl hw.cpu64bit_capable`
+		if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then
+			HOSTARCH="amd64"
+		else
+			HOSTARCH="x86"
+		fi
+	else
+		 HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
+		-e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
+		-e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
(Continue reading)

repository service | 4 May 2013 13:01

[commit] r1136 - tags/openbios-1.1

Author: blueswirl
Date: Sat May  4 13:01:04 2013
New Revision: 1136
URL: http://tracker.coreboot.org/trac/openbios/changeset/1136

Log:
Tag version 1.1

Signed-off-by: Blue Swirl <blauwirbel@...>

Added:
   tags/openbios-1.1/
      - copied from r1135, trunk/openbios-devel/

repository service | 4 May 2013 12:56

[commit] r1135 - trunk/openbios-devel

Author: blueswirl
Date: Sat May  4 12:56:49 2013
New Revision: 1135
URL: http://tracker.coreboot.org/trac/openbios/changeset/1135

Log:
Bump version to 1.1

Signed-off-by: Blue Swirl <blauwirbel@...>

Modified:
   trunk/openbios-devel/VERSION

Modified: trunk/openbios-devel/VERSION
==============================================================================
--- trunk/openbios-devel/VERSION	Fri May  3 23:45:00 2013	(r1134)
+++ trunk/openbios-devel/VERSION	Sat May  4 12:56:49 2013	(r1135)
 <at>  <at>  -1 +1  <at>  <at> 
-1.0
+1.1

Programmingkid | 3 May 2013 23:50
Picon

About udelay

I see that you used a loop to simulate a wait time. I think there must be a better way of doing it. Doesn't the
Sparc emulator have access to a hardware clock that we can use instead of a loop?
repository service | 3 May 2013 23:45

[commit] r1134 - trunk/openbios-devel/arch/sparc64

Author: mcayland
Date: Fri May  3 23:45:00 2013
New Revision: 1134
URL: http://tracker.coreboot.org/trac/openbios/changeset/1134

Log:
SPARC64: Add trivial implementation of udelay()

The OpenBIOS IDE driver calls udelay() in order to wait for IDE transfers
to complete. Without an implementation of udelay(), the IDE timeout is too
low causing sporadic errors during periods of high I/O activity. As reported
by Artyom Tarasenko.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@...>

Modified:
   trunk/openbios-devel/arch/sparc64/openbios.c

Modified: trunk/openbios-devel/arch/sparc64/openbios.c
==============================================================================
--- trunk/openbios-devel/arch/sparc64/openbios.c	Sat Apr 27 13:42:18 2013	(r1133)
+++ trunk/openbios-devel/arch/sparc64/openbios.c	Fri May  3 23:45:00 2013	(r1134)
 <at>  <at>  -547,6 +547,9  <at>  <at> 

 void udelay(unsigned int usecs)
 {
+    volatile int i;
+
+    for (i = 0; i < usecs * 100; i++);
 }
(Continue reading)

repository service | 27 Apr 2013 13:42

[commit] r1133 - trunk/openbios-devel/drivers

Author: blueswirl
Date: Sat Apr 27 13:42:18 2013
New Revision: 1133
URL: http://tracker.coreboot.org/trac/openbios/changeset/1133

Log:
use the proper name for the virtio-blk devices

The name 'virtio-scsi' is misleading, since there is another device
called 'virtio-scsi' in QEMU. Use the name 'virtio-blk' instead.

Signed-off-by: Artyom Tarasenko <atar4qemu@...>
Signed-off-by: Blue Swirl <blauwirbel@...>

Modified:
   trunk/openbios-devel/drivers/pci_database.c

Modified: trunk/openbios-devel/drivers/pci_database.c
==============================================================================
--- trunk/openbios-devel/drivers/pci_database.c	Sat Apr 27 13:42:16 2013	(r1132)
+++ trunk/openbios-devel/drivers/pci_database.c	Sat Apr 27 13:42:18 2013	(r1133)
 <at>  <at>  -49,7 +49,7  <at>  <at> 
     {
         /* Virtio-block controller */
         PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_BLOCK,
-        NULL, "virtio-scsi", NULL,
+        NULL, "virtio-blk", NULL,
         "pci1af4,1001\0pci1af4,1001\0pciclass,01018f\0",
         0, 0, 0,
         NULL, NULL,
(Continue reading)

repository service | 27 Apr 2013 13:42

[commit] r1132 - trunk/openbios-devel/drivers

Author: blueswirl
Date: Sat Apr 27 13:42:16 2013
New Revision: 1132
URL: http://tracker.coreboot.org/trac/openbios/changeset/1132

Log:
sparc64: remove hacks for the "interrupts" property

Forcing the "interrupts" property to the value of zero is not
necessary, and is incompatible with the IRQ mapping schema
introduced in the previous commit

Signed-off-by: Artyom Tarasenko <atar4qemu@...>
Signed-off-by: Blue Swirl <blauwirbel@...>

Modified:
   trunk/openbios-devel/drivers/ide.c
   trunk/openbios-devel/drivers/pci.c
   trunk/openbios-devel/drivers/pci_database.c
   trunk/openbios-devel/drivers/pci_database.h

Modified: trunk/openbios-devel/drivers/ide.c
==============================================================================
--- trunk/openbios-devel/drivers/ide.c	Sat Apr 27 13:42:14 2013	(r1131)
+++ trunk/openbios-devel/drivers/ide.c	Sat Apr 27 13:42:16 2013	(r1132)
 <at>  <at>  -1432,8 +1432,6  <at>  <at> 
 		props[0]=14; props[1]=0;
 		set_property(dnode, "interrupts",
 			     (char *)&props, 2*sizeof(props[0]));
-#elif defined(CONFIG_SPARC64)
(Continue reading)

repository service | 27 Apr 2013 13:42

[commit] r1131 - trunk/openbios-devel/drivers

Author: blueswirl
Date: Sat Apr 27 13:42:14 2013
New Revision: 1131
URL: http://tracker.coreboot.org/trac/openbios/changeset/1131

Log:
sparc64: use direct interrupt mapping for PCI devices

Every PCI Slot in PBM has 4 directly mapped IRQ lines.
Use the IRQ routing schema 0bssnn (Bus, Slot, interrupt Number)
described in Section 19.3.3 of UltraSPARCâ„¢-IIi User's Manual.

Please note that this patch requires the QEMU counterpart patch.

Signed-off-by: Artyom Tarasenko <atar4qemu <at> gmail.com>
Signed-off-by: Blue Swirl <blauwirbel <at> gmail.com>

Modified:
   trunk/openbios-devel/drivers/pci.c

Modified: trunk/openbios-devel/drivers/pci.c
==============================================================================
--- trunk/openbios-devel/drivers/pci.c	Sat Apr 27 13:30:16 2013	(r1130)
+++ trunk/openbios-devel/drivers/pci.c	Sat Apr 27 13:42:14 2013	(r1131)
 <at>  <at>  -854,7 +854,14  <at>  <at> 
 	if (config->irq_pin) {
 		OLDWORLD(set_int_property(dev, "AAPL,interrupts",
 					  config->irq_line));
+#if defined(CONFIG_SPARC64)
+                /* direct mapping bssnn (Bus, Slot, interrupt Number */
(Continue reading)

repository service | 27 Apr 2013 13:30

[commit] r1130 - trunk/openbios-devel/arch/sparc32

Author: mcayland
Date: Sat Apr 27 13:30:16 2013
New Revision: 1130
URL: http://tracker.coreboot.org/trac/openbios/changeset/1130

Log:
SPARC32: Remove high memory virtual memory reservation

The high memory virtual memory reservation introduced in r1114 was a mistake.
We need to leave this area as available for clients but simply not allocate
from it so that the 0xffc00000 area is free for kadb on older versions of
SunOS. Since this part is already handled by the introduction of OFMEM_VIRT_TOP
in the same commit then the behaviour is already correct. As reported by Artyom
Tarasenko.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@...>

Modified:
   trunk/openbios-devel/arch/sparc32/openbios.c

Modified: trunk/openbios-devel/arch/sparc32/openbios.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/openbios.c	Fri Apr 26 11:53:43 2013	(r1129)
+++ trunk/openbios-devel/arch/sparc32/openbios.c	Sat Apr 27 13:30:16 2013	(r1130)
 <at>  <at>  -820,9 +820,6  <at>  <at> 
     /* Generate the mapping (and lock translation into the TLBs) */
     ofmem_map(phys, virt, MEMORY_SIZE, ofmem_arch_default_translation_mode(phys));

-    /* Mark everything up until OFMEM_VIRT_TOP as in use */
-    ofmem_claim_virt(OFMEM_VIRT_TOP, OF_CODE_START - MEMORY_SIZE - OFMEM_VIRT_TOP, 0);
(Continue reading)

Artyom Tarasenko | 27 Apr 2013 09:13
Picon

[PATCH 1/2] sparc64: use MMIO for NVRAM access

Use MMIO for accessing the m48t08 NVRAM chip.
This patch is a counterpart of a QEMU change.

Signed-off-by: Artyom Tarasenko <atar4qemu@...>
---
 arch/sparc64/openbios.c |   30 ++++++++----------------------
 1 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/arch/sparc64/openbios.c b/arch/sparc64/openbios.c
index a6c956a..2e70a9d 100644
--- a/arch/sparc64/openbios.c
+++ b/arch/sparc64/openbios.c
 <at>  <at>  -26,9 +26,7  <at>  <at> 

 #define UUID_FMT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"

-#define NVRAM_ADDR_LO 0x74
-#define NVRAM_ADDR_HI 0x75
-#define NVRAM_DATA    0x77
+#define NVRAM_BASE    0x02000

 #define APB_SPECIAL_BASE     0x1fe00000000ULL
 #define APB_MEM_BASE         0x1ff00000000ULL
 <at>  <at>  -40,7 +38,7  <at>  <at> 
 #define NVRAM_IDPROM     0x1fd8
 #define NVRAM_IDPROM_SIZE 32
 #define NVRAM_OB_START   (0)
-#define NVRAM_OB_SIZE    ((0x1fd0 - NVRAM_OB_START) & ~15)
+#define NVRAM_OB_SIZE    ((NVRAM_IDPROM - NVRAM_OB_START) & ~15)

(Continue reading)


Gmane