PPC64 prom logo

8 messages, 3 authors, 2003-03-25 · open the first message on its own page

PPC64 prom logo

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2003-03-23 10:44:52

Sorry, it seems I missed a RELOC in the PPC64 prom logo code. Is this (patch
against current BK) OK?
--- linux-2.5.x/arch/ppc64/kernel/prom.c.orig	Sun Mar 23 11:37:52 2003
+++ linux-2.5.x/arch/ppc64/kernel/prom.c	Sun Mar 23 11:39:35 2003
@@ -1271,7 +1271,8 @@
 
 #ifdef CONFIG_FB_LOGO_LINUX_CLUT224
 		clut = RELOC(RELOC(&logo_linux_clut224)->clut);
-		for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3)
+		for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize;
+		     i++, clut += 3)
 			if (prom_set_color(ih, i + 32, clut[0], clut[1],
 					   clut[2]) != 0)
 				break;
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

Re: PPC64 prom logo

From: Paul Mackerras <hidden>
Date: 2003-03-23 11:37:55

Geert Uytterhoeven writes:
Sorry, it seems I missed a RELOC in the PPC64 prom logo code. Is this (patch
against current BK) OK?
You missed a PTRRELOC in the ppc32 code too:

diff -urN linux-2.5/arch/ppc/syslib/prom_init.c linuxppc-2.5/arch/ppc/syslib/prom_init.c
--- linux-2.5/arch/ppc/syslib/prom_init.c	2003-03-23 16:29:31.000000000 +1100
+++ linuxppc-2.5/arch/ppc/syslib/prom_init.c	2003-03-23 21:38:46.000000000 +1100
@@ -369,7 +369,7 @@
 					break;
 
 #ifdef CONFIG_LOGO_LINUX_CLUT224
-			clut = logo_linux_clut224.clut;
+			clut = PTRRELOC(logo_linux_clut224.clut);
 			for (i = 0; i < logo_linux_clut224.clutsize;
 			     i++, clut += 3)
 				if (prom_set_color(ih, i + 32, clut[0],
Regards,
Paul.


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

Re: PPC64 prom logo

From: James Simmons <hidden>
Date: 2003-03-24 18:49:52

Applied.

MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.

James Simmons  [jsimmons@users.sf.net] 	                ____/|
fbdev/console/gfx developer                             \ o.O|
http://www.linux-fbdev.org                               =(_)=
http://linuxgfx.sourceforge.net                            U
http://linuxconsole.sourceforge.net

On Sun, 23 Mar 2003, Geert Uytterhoeven wrote:
quoted hunk
Sorry, it seems I missed a RELOC in the PPC64 prom logo code. Is this (patch
against current BK) OK?
--- linux-2.5.x/arch/ppc64/kernel/prom.c.orig	Sun Mar 23 11:37:52 2003
+++ linux-2.5.x/arch/ppc64/kernel/prom.c	Sun Mar 23 11:39:35 2003
@@ -1271,7 +1271,8 @@

 #ifdef CONFIG_FB_LOGO_LINUX_CLUT224
 		clut = RELOC(RELOC(&logo_linux_clut224)->clut);
-		for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3)
+		for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize;
+		     i++, clut += 3)
 			if (prom_set_color(ih, i + 32, clut[0], clut[1],
 					   clut[2]) != 0)
 				break;
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: PPC64 prom logo

From: James Simmons <hidden>
Date: 2003-03-24 18:51:07

Applied.


MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.

James Simmons  [jsimmons@users.sf.net] 	                ____/|
fbdev/console/gfx developer                             \ o.O|
http://www.linux-fbdev.org                               =(_)=
http://linuxgfx.sourceforge.net                            U
http://linuxconsole.sourceforge.net




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: PPC64 prom logo

From: James Simmons <hidden>
Date: 2003-03-24 18:58:07

quoted hunk
--- linux-2.5.x/arch/ppc64/kernel/prom.c.orig	Sun Mar 23 11:37:52 2003
+++ linux-2.5.x/arch/ppc64/kernel/prom.c	Sun Mar 23 11:39:35 2003
@@ -1271,7 +1271,8 @@
 
 #ifdef CONFIG_FB_LOGO_LINUX_CLUT224
 		clut = RELOC(RELOC(&logo_linux_clut224)->clut);
-		for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3)
+		for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize;
+		     i++, clut += 3)
 			if (prom_set_color(ih, i + 32, clut[0], clut[1],
 					   clut[2]) != 0)
 				break;
Shoudln't that be clut = RELOC(&logo_linux_clut2 instead?



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: PPC64 prom logo

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2003-03-24 19:22:24

On Mon, 24 Mar 2003, James Simmons wrote:
quoted
--- linux-2.5.x/arch/ppc64/kernel/prom.c.orig	Sun Mar 23 11:37:52 2003
+++ linux-2.5.x/arch/ppc64/kernel/prom.c	Sun Mar 23 11:39:35 2003
@@ -1271,7 +1271,8 @@
 
 #ifdef CONFIG_FB_LOGO_LINUX_CLUT224
 		clut = RELOC(RELOC(&logo_linux_clut224)->clut);
-		for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3)
+		for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize;
+		     i++, clut += 3)
 			if (prom_set_color(ih, i + 32, clut[0], clut[1],
 					   clut[2]) != 0)
 				break;
Shoudln't that be clut = RELOC(&logo_linux_clut2 instead?
I don't think so. First the logo_linux_clut224 symbol has to be relocated,
followed by the pointer to the CLUT.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: PPC64 prom logo

From: Paul Mackerras <hidden>
Date: 2003-03-24 20:37:09

Geert Uytterhoeven writes:
On Mon, 24 Mar 2003, James Simmons wrote:
quoted
quoted
--- linux-2.5.x/arch/ppc64/kernel/prom.c.orig	Sun Mar 23 11:37:52 2003
+++ linux-2.5.x/arch/ppc64/kernel/prom.c	Sun Mar 23 11:39:35 2003
@@ -1271,7 +1271,8 @@

 #ifdef CONFIG_FB_LOGO_LINUX_CLUT224
 		clut = RELOC(RELOC(&logo_linux_clut224)->clut);
-		for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3)
+		for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize;
+		     i++, clut += 3)
 			if (prom_set_color(ih, i + 32, clut[0], clut[1],
 					   clut[2]) != 0)
 				break;
Shoudln't that be clut = RELOC(&logo_linux_clut2 instead?
I don't think so. First the logo_linux_clut224 symbol has to be relocated,
followed by the pointer to the CLUT.
Actually, you should use RELOC on a variable (an L-value) or PTRRELOC
on a value (an R-value), so it should look like this:

	clut = PTRRELOC(RELOC(logo_linux_clut224.clut));
	for (i = 0; i < RELOC(logo_linux_clut224.clutsize); i++, clut += 3)

etc.  I'll test on an actual ppc64 box and send a tested patch.

Paul.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: PPC64 prom logo

From: James Simmons <hidden>
Date: 2003-03-25 18:17:51

Actually, you should use RELOC on a variable (an L-value) or PTRRELOC
on a value (an R-value), so it should look like this:

	clut = PTRRELOC(RELOC(logo_linux_clut224.clut));
	for (i = 0; i < RELOC(logo_linux_clut224.clutsize); i++, clut += 3)

etc.  I'll test on an actual ppc64 box and send a tested patch.
Do you have a functional and tested patch?





-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help