[OpenBIOS] fcode rom loading
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Fri Jul 1 17:39:01 CEST 2011
On 30/06/11 19:40, Bob Breuer wrote:
> Maybe the 4096 in hex is a mistake, and it was intended to be 4096
> decimal. For now, this patch (probably mangled by my mailer) seems to work:
>
> Index: arch/sparc32/openbios.c
> ===================================================================
> --- arch/sparc32/openbios.c (revision 1044)
> +++ arch/sparc32/openbios.c (working copy)
> @@ -27,7 +27,7 @@
> #include "arch/common/fw_cfg.h"
> #include "libopenbios/ofmem.h"
>
> -#define MEMORY_SIZE (16*1024) /* 16K ram for hosted system */
> +#define MEMORY_SIZE (128*1024) /* 128K ram for hosted system */
> #define UUID_FMT
> "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
> #define FW_CFG_SUN4M_DEPTH (FW_CFG_ARCH_LOCAL + 0x00)
>
> Index: arch/sparc32/ofmem_sparc32.c
> ===================================================================
> --- arch/sparc32/ofmem_sparc32.c (revision 1044)
> +++ arch/sparc32/ofmem_sparc32.c (working copy)
> @@ -21,7 +21,7 @@
>
> #define OF_MALLOC_BASE ((char*)OFMEM +
> ALIGN_SIZE(sizeof(ofmem_t), 8))
>
> -#define MEMSIZE (256 * 1024)
> +#define MEMSIZE (512 * 1024)
> static union {
> char memory[MEMSIZE];
> ofmem_t ofmem;
>
>
> I'll take another look at this after shaking out a few more possible bugs.
Ooooh so you can get away with re-arranging the internal memory space to
find enough space for the fcode tables after all - nice one :)
> Next up is my-address and my-space. Under OBP on an SS-20, I can do this:
> ok " /iommu/sbus" select-dev
> ok new-device
> ok 0 0 " 1,abc" set-args
> ok my-address . my-space .
> abc 1
> With OpenBIOS, I just get zeros for both my-address and my-space.
>
> While skimming the IEEE-1275 spec, I found begin-package, which under
> OpenBIOS does set my-address and my-space correctly. Am I just missing
> something, or could there be a bug in either set-args or new-device?
Possibly. Bear in mind that OpenBIOS now has a source debugger so you
can try something like:
" /iommu/sbus" select-dev
new-device
0 0 " 1,abc"
debug set-args
set-args
...and off you go.
HTH,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the OpenBIOS
mailing list