All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis@austin.ibm.com>
To: embedded list <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: 405LP - Beech with SSX firmware
Date: 08 Jan 2003 13:23:56 -0600	[thread overview]
Message-ID: <1042053852.1207.176.camel@granite.austin.ibm.com> (raw)
In-Reply-To: <1040427361.1096.27.camel@granite.austin.ibm.com>

[-- 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

  reply	other threads:[~2003-01-08 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-20 23:36 405LP - Beech with SSX firmware Hollis Blanchard
2003-01-08 19:23 ` Hollis Blanchard [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1042053852.1207.176.camel@granite.austin.ibm.com \
    --to=hollis@austin.ibm.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.