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 -------------- next part -------------- ===== 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