It was returning true for ARCH_PREP although not an Apple device.
Limit it to Old World and New World Macs.
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
---
arch/ppc/qemu/init.c | 2 +-
1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
index a8fc320..8efbeeb 100644
--- a/arch/ppc/qemu/init.c
+++ b/arch/ppc/qemu/init.c
@@ -76,7 +76,7 @@ enum {
int is_apple(void)
{
- return 1;
+ return is_oldworld() || is_newworld();
}
int is_oldworld(void)
--
1.7.10.4
On Thu, Feb 28, 2013 at 10:23:02PM +0100, Kristian Valind wrote:
> Are you sure you're sending the right log files?
>
> "Welcome to OpenBIOS v1.0 built on Dec 18 2012 10:41"
>
>
> I'm not sure if I'm stating the already obvious, but with the lastest git
> revision of qemu and the latest svn of openbios the Darwin 8.0.1 kernel
> loads just fine for me on the g3beige machine. Making use of the emulated
> Heathrow (and thus mounting root) is a whole other matter however.
>
> Kristian
Seems like someone checked moderation queue, it's old message, from
december. I did resend it
http://lists.openbios.org/pipermail/openbios/2012-December/007243.html
Amadeusz
Here are results of my testing booting OS X on latest trunk
Logs in attachment
Not patched ones (fails without get-key-map):
10.0.log
10.2.log
10.4.log
Patched with gsoc get-key-map patch:
10.0-gkm.log
10.2-gkm-panic.log
10.4-gkm.log
Patched with gsoc divide by 0:
10.2-gkm-dvb0.log
Logs from patched boot without CIF:
all-without-cif.log
10.2 ones show that there is need for some solution regarding division
by 0, some notes from my talks with Mark:
My g5 machine returns 0 when dividing by 0, no warnings are printed:
0 > 0 0 / ok
1 > . ok
0 > 0
0 > 2 0 / ok
1 > . ok
0 > 0
Question is how to implement it, or maybe just use gsoc patch?
Also it seems that Mac OS X seems to provide it's own fill-rectangle and draw-rectangle
it prints:
FILL-RECTANGLE isn't unique.
and also similar message when I apply gsoc draw-rectangle patch
so it seems that this one isn't needed
Another problem is that it seems to be unable to open/load kernel.
On graphic side of things it seems to draw things better than with gsoc
patches, graphics are not weirdly resized, but there is not much to see
except boot folder graphic (10.0)/white apple(10.2, 10.4).
Amadeusz
Author: mcayland
Date: Thu Feb 28 00:06:10 2013
New Revision: 1100
URL: http://tracker.coreboot.org/trac/openbios/changeset/1100
Log:
mac-parts.c: Fix /packages/mac-parts boot when the package arguments are empty.
Commit r1072 removed a couple of NULL pointer checks for package arguments,
however if the arguments are empty in Forth then they are converted back to a
NULL pointer which causes an exception when dereferenced.
Add the checks back in which fixes boot of the debian_lenny_powerpc_small.qcow2
test image with quik once again. Based upon an earlier patch by Alexander Graf
<agraf(a)suse.de>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
CC: Alexander Graf <agraf(a)suse.de>
Modified:
trunk/openbios-devel/packages/mac-parts.c
Modified: trunk/openbios-devel/packages/mac-parts.c
==============================================================================
--- trunk/openbios-devel/packages/mac-parts.c Sat Feb 16 13:08:33 2013 (r1099)
+++ trunk/openbios-devel/packages/mac-parts.c Thu Feb 28 00:06:10 2013 (r1100)
@@ -68,7 +68,7 @@
[(id)][,][filespec]
*/
- if ( strlen(str) ) {
+ if ( str && strlen(str) ) {
/* Detect the arguments */
if ((*str >= '0' && *str <= '9') || (*str == ',')) {
push_str(str);
@@ -126,7 +126,7 @@
* Implement partition selection as per the PowerPC Microprocessor CHRP bindings
*/
- if (parnum == 0) {
+ if (str == NULL || parnum == 0) {
/* According to the spec, partition 0 as well as no arguments means the whole disk */
offs = (long long)0;
size = (long long)__be32_to_cpu(dmap.sbBlkCount) * bs;
On startup, OpenBIOS copies exception vectors to 0x00000000.
Therefore jumps cannot be performed relative to the compile-time address
to outside the relocated exception vectors.
QEMU's g3beige and mac99 did not run into this so far, but prep does.
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
---
arch/ppc/qemu/start.S | 4 +++-
1 Datei geändert, 3 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S
index 5c86d74..66987a0 100644
--- a/arch/ppc/qemu/start.S
+++ b/arch/ppc/qemu/start.S
@@ -302,7 +302,9 @@ trap_error:
bctr
VECTOR( 0x100, "SRE" ):
- b _entry
+ LOAD_REG_IMMEDIATE(r3, _entry)
+ mtctr r3
+ bctr
ILLEGAL_VECTOR( 0x200 )
--
1.7.10.4
Commit r1072 removed a couple of NULL pointer checks for package arguments,
however if the arguments are empty in Forth then they are converted back to a
NULL pointer which causes an exception when dereferenced.
Add the checks back in which fixes boot of the debian_lenny_powerpc_small.qcow2
test image with quik once again. Based upon an earlier patch by Alexander Graf
<agraf(a)suse.de>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
CC: Alexander Garf <agraf(a)suse.de>
---
openbios-devel/packages/mac-parts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/openbios-devel/packages/mac-parts.c b/openbios-devel/packages/mac-parts.c
index d0cba05..12c94e5 100644
--- a/openbios-devel/packages/mac-parts.c
+++ b/openbios-devel/packages/mac-parts.c
@@ -68,7 +68,7 @@ macparts_open( macparts_info_t *di )
[(id)][,][filespec]
*/
- if ( strlen(str) ) {
+ if ( str && strlen(str) ) {
/* Detect the arguments */
if ((*str >= '0' && *str <= '9') || (*str == ',')) {
push_str(str);
@@ -126,7 +126,7 @@ macparts_open( macparts_info_t *di )
* Implement partition selection as per the PowerPC Microprocessor CHRP bindings
*/
- if (parnum == 0) {
+ if (str == NULL || parnum == 0) {
/* According to the spec, partition 0 as well as no arguments means the whole disk */
offs = (long long)0;
size = (long long)__be32_to_cpu(dmap.sbBlkCount) * bs;
--
1.7.10.4
I am investigating the device tree of the mac99 model. It looks like it is wrong. The part that I am concerned with is the via-cuda node. Both my iMac and iBook don't even have a via-cuda. They both have a via-pmu@16000 node. I'm hoping someone has an original blue and white PowerMac G3. I would like the full device tree printout from it. The question I am trying to answer is does any newworld Mac have a via-cuda? If they don't, we know that it should be changed to a via-pmu@16000 node.
Commit r1072 removed the check for NULL pointer strings in the mac
partition lookup. However, without that check we would end up dereferencing
this string pointer later, breaking my Debian Lenny test image.
Add the check back in. This fixes Lenny with quik again.
Signed-off-by: Alexander Graf <agraf(a)suse.de>
---
packages/mac-parts.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/packages/mac-parts.c b/packages/mac-parts.c
index d0cba05..330d8a0 100644
--- a/packages/mac-parts.c
+++ b/packages/mac-parts.c
@@ -126,7 +126,7 @@ macparts_open( macparts_info_t *di )
* Implement partition selection as per the PowerPC Microprocessor CHRP bindings
*/
- if (parnum == 0) {
+ if (str == NULL || parnum == 0) {
/* According to the spec, partition 0 as well as no arguments means the whole disk */
offs = (long long)0;
size = (long long)__be32_to_cpu(dmap.sbBlkCount) * bs;
--
1.6.0.2