* 405LP - Beech with SSX firmware
@ 2002-12-20 23:36 Hollis Blanchard
2003-01-08 19:23 ` Hollis Blanchard
0 siblings, 1 reply; 7+ messages in thread
From: Hollis Blanchard @ 2002-12-20 23:36 UTC (permalink / raw)
To: embedded list; +Cc: Bishop Brock
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
Hi, this patch (copied from Arctic) allows Beech to boot with SSX
firmware. If there's a way to detect OpenBIOS vs PIBS (I've asked for
confirmation) then I think the Beech and Arctic ifdefs could be combined
in the file. There may not be though, and in the meantime this works.
Please apply to _2_4_devel.
-Hollis
--
PowerPC Linux
IBM Linux Technology Center
[-- Attachment #2: 405LP-beech-ssx.diff --]
[-- Type: text/plain, Size: 1293 bytes --]
===== arch/ppc/boot/simple/embed_config.c 1.20 vs edited =====
--- 1.20/arch/ppc/boot/simple/embed_config.c Sun Dec 15 20:02:08 2002
+++ edited/arch/ppc/boot/simple/embed_config.c Wed Dec 18 15:53:18 2002
@@ -868,12 +868,33 @@
#endif
#ifdef CONFIG_BEECH
-static void
-get_board_info(bd_t **bdp)
+/* Several bootloaders have been used on Beech. We assume either
+ * SSX or OpenBIOS */
+
+#define SSX_BIOS_ADDR 0xFFFF0000
+#define SSX_BIOS_GET_BOARD_INFO 0
+
+struct ssx_bios_id {
+ unsigned int boot_branch; /* Branch to bootcode */
+ char ssx_bios[8]; /* "SSX BIOS" (no \0) */
+ void (*bios_entry_point)(unsigned int, bd_t *); /* Call bios_entry_point(cmd, &data) */
+};
+
+extern int memcmp(const void *s1, const void *s2, size_t n);
+
+static void get_board_info(bd_t **bdp)
{
- typedef void (*PFV)(bd_t *bd);
- ((PFV)(*(unsigned long *)BOARD_INFO_VECTOR))(*bdp);
- return;
+ struct ssx_bios_id *ssx = (struct ssx_bios_id *)SSX_BIOS_ADDR;
+
+ /* Check for SSX signature */
+
+ if (memcmp(&ssx->ssx_bios, "SSX BIOS", 8) == 0) {
+ ssx->bios_entry_point(SSX_BIOS_GET_BOARD_INFO, *bdp);
+ } else {
+ /* It's not SSX, so assume OpenBIOS */
+ typedef void (*PFV)(bd_t *bd);
+ ((PFV)(*(unsigned long *)BOARD_INFO_VECTOR))(*bdp);
+ }
}
void
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 405LP - Beech with SSX firmware
2002-12-20 23:36 405LP - Beech with SSX firmware Hollis Blanchard
@ 2003-01-08 19:23 ` Hollis Blanchard
2003-01-09 2:23 ` David Gibson
2003-01-09 18:54 ` Calling Application Aman
0 siblings, 2 replies; 7+ messages in thread
From: Hollis Blanchard @ 2003-01-08 19:23 UTC (permalink / raw)
To: embedded list
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
On Fri, 2002-12-20 at 17:36, Hollis Blanchard wrote:
> Hi, this patch (copied from Arctic) allows Beech to boot with SSX
> firmware. If there's a way to detect OpenBIOS vs PIBS (I've asked for
> confirmation) then I think the Beech and Arctic ifdefs could be combined
> in the file. There may not be though, and in the meantime this works.
There is currently no way to detect PIBS, though I think I talked the
developer into including "PIBS" string in the future.
-Hollis
--
PowerPC Linux
IBM Linux Technology Center
[-- Attachment #2: 405LP-beech-ssx.diff --]
[-- Type: text/plain, Size: 1293 bytes --]
===== arch/ppc/boot/simple/embed_config.c 1.20 vs edited =====
--- 1.20/arch/ppc/boot/simple/embed_config.c Sun Dec 15 20:02:08 2002
+++ edited/arch/ppc/boot/simple/embed_config.c Wed Dec 18 15:53:18 2002
@@ -868,12 +868,33 @@
#endif
#ifdef CONFIG_BEECH
-static void
-get_board_info(bd_t **bdp)
+/* Several bootloaders have been used on Beech. We assume either
+ * SSX or OpenBIOS */
+
+#define SSX_BIOS_ADDR 0xFFFF0000
+#define SSX_BIOS_GET_BOARD_INFO 0
+
+struct ssx_bios_id {
+ unsigned int boot_branch; /* Branch to bootcode */
+ char ssx_bios[8]; /* "SSX BIOS" (no \0) */
+ void (*bios_entry_point)(unsigned int, bd_t *); /* Call bios_entry_point(cmd, &data) */
+};
+
+extern int memcmp(const void *s1, const void *s2, size_t n);
+
+static void get_board_info(bd_t **bdp)
{
- typedef void (*PFV)(bd_t *bd);
- ((PFV)(*(unsigned long *)BOARD_INFO_VECTOR))(*bdp);
- return;
+ struct ssx_bios_id *ssx = (struct ssx_bios_id *)SSX_BIOS_ADDR;
+
+ /* Check for SSX signature */
+
+ if (memcmp(&ssx->ssx_bios, "SSX BIOS", 8) == 0) {
+ ssx->bios_entry_point(SSX_BIOS_GET_BOARD_INFO, *bdp);
+ } else {
+ /* It's not SSX, so assume OpenBIOS */
+ typedef void (*PFV)(bd_t *bd);
+ ((PFV)(*(unsigned long *)BOARD_INFO_VECTOR))(*bdp);
+ }
}
void
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 405LP - Beech with SSX firmware
2003-01-08 19:23 ` Hollis Blanchard
@ 2003-01-09 2:23 ` David Gibson
2003-01-09 18:54 ` Calling Application Aman
1 sibling, 0 replies; 7+ messages in thread
From: David Gibson @ 2003-01-09 2:23 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: embedded list
On Wed, Jan 08, 2003 at 01:23:56PM -0600, Hollis Blanchard wrote:
> On Fri, 2002-12-20 at 17:36, Hollis Blanchard wrote:
> > Hi, this patch (copied from Arctic) allows Beech to boot with SSX
> > firmware. If there's a way to detect OpenBIOS vs PIBS (I've asked for
> > confirmation) then I think the Beech and Arctic ifdefs could be combined
> > in the file. There may not be though, and in the meantime this works.
>
> There is currently no way to detect PIBS, though I think I talked the
> developer into including "PIBS" string in the future.
I've applied the patch to 2_4_devel.
--
David Gibson | For every complex problem there is a
david@gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Calling Application
2003-01-08 19:23 ` Hollis Blanchard
2003-01-09 2:23 ` David Gibson
@ 2003-01-09 18:54 ` Aman
2003-01-09 19:10 ` Wolfgang Denk
` (2 more replies)
1 sibling, 3 replies; 7+ messages in thread
From: Aman @ 2003-01-09 18:54 UTC (permalink / raw)
To: linuxppc embedded
Hi All
This might be a basic question. I have build the linux kernel for custom
board which has PPC 440GP as its processor. I have also build my
application. Now I wanted to call my application after the kernel boots up.
Can you tell me where I hv to call my application.
Thanking you in advance
Regards
Aman
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Calling Application
2003-01-09 18:54 ` Calling Application Aman
@ 2003-01-09 19:10 ` Wolfgang Denk
2003-01-09 19:12 ` Dr. Craig Hollabaugh
2003-01-09 19:21 ` Der Herr Hofrat
2 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2003-01-09 19:10 UTC (permalink / raw)
To: Aman; +Cc: linuxppc embedded
In message <001b01c2b810$7ec76720$370da8c0@aman> you wrote:
>
> This might be a basic question. I have build the linux kernel for custom
> board which has PPC 440GP as its processor. I have also build my
> application. Now I wanted to call my application after the kernel boots up.
> Can you tell me where I hv to call my application.
Just like you start all other utility and server processes in Unix
systems: either you start it from one of your init scripts, or - in
case of simple systems - your application might even become the init
process.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
"Life sucks, but it's better than the alternative."
- Peter da Silva
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Calling Application
2003-01-09 18:54 ` Calling Application Aman
2003-01-09 19:10 ` Wolfgang Denk
@ 2003-01-09 19:12 ` Dr. Craig Hollabaugh
2003-01-09 19:21 ` Der Herr Hofrat
2 siblings, 0 replies; 7+ messages in thread
From: Dr. Craig Hollabaugh @ 2003-01-09 19:12 UTC (permalink / raw)
To: Aman, linuxppc embedded
At 12:24 AM 1/10/2003 +0530, Aman wrote:
>
>Hi All
>
>This might be a basic question. I have build the linux kernel for custom
>board which has PPC 440GP as its processor. I have also build my
>application. Now I wanted to call my application after the kernel boots up.
>Can you tell me where I hv to call my application.
look at /etc/inittab, put your application in one of those scripts or call it directly from the within the inittab, much like the gettys.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Calling Application
2003-01-09 18:54 ` Calling Application Aman
2003-01-09 19:10 ` Wolfgang Denk
2003-01-09 19:12 ` Dr. Craig Hollabaugh
@ 2003-01-09 19:21 ` Der Herr Hofrat
2 siblings, 0 replies; 7+ messages in thread
From: Der Herr Hofrat @ 2003-01-09 19:21 UTC (permalink / raw)
To: Aman; +Cc: linuxppc embedded
>
> Hi All
>
> This might be a basic question. I have build the linux kernel for custom
> board which has PPC 440GP as its processor. I have also build my
> application. Now I wanted to call my application after the kernel boots up.
> Can you tell me where I hv to call my application.
>
pass the kernel a init=/bin/my_app at the boot-prompt if you realy want only
that one app to run, otherwise use the inittab or one of the resource scripts
in /etc/rc.d to launch your application.
hofrat
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-01-09 19:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-20 23:36 405LP - Beech with SSX firmware Hollis Blanchard
2003-01-08 19:23 ` Hollis Blanchard
2003-01-09 2:23 ` David Gibson
2003-01-09 18:54 ` Calling Application Aman
2003-01-09 19:10 ` Wolfgang Denk
2003-01-09 19:12 ` Dr. Craig Hollabaugh
2003-01-09 19:21 ` Der Herr Hofrat
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.