j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Sat Jul 27 13:22:02 2013 New Revision: 1193 URL: http://tracker.coreboot.org/trac/openbios/changeset/1193
Log: SPARC32: switch TCX driver over to FCode
Currently we cannot read the FCode from the card, so for the moment simply execute the bytecode directly.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/sparc32/build.xml trunk/openbios-devel/arch/sparc32/init.fs trunk/openbios-devel/arch/sparc32/tree.fs trunk/openbios-devel/drivers/build.xml trunk/openbios-devel/drivers/sbus.c trunk/openbios-devel/drivers/tcx.fs
Modified: trunk/openbios-devel/arch/sparc32/build.xml ============================================================================== --- trunk/openbios-devel/arch/sparc32/build.xml Sat Jul 27 13:21:59 2013 (r1192) +++ trunk/openbios-devel/arch/sparc32/build.xml Sat Jul 27 13:22:02 2013 (r1193) @@ -3,6 +3,7 @@ <dictionary name="openbios-sparc32" init="openbios"> <object source="tree.fs" target="forth"/> <object source="init.fs" target="forth"/> + <object source="QEMU,tcx.bin" target="fcode" condition="DRIVER_SBUS"/> </dictionary>
<library name="sparc32" type="static" target="target">
Modified: trunk/openbios-devel/arch/sparc32/init.fs ============================================================================== --- trunk/openbios-devel/arch/sparc32/init.fs Sat Jul 27 13:21:59 2013 (r1192) +++ trunk/openbios-devel/arch/sparc32/init.fs Sat Jul 27 13:22:02 2013 (r1193) @@ -45,3 +45,9 @@ : obmem ( -- space ) 0 ; + +\ Load TCX FCode driver blob +[IFDEF] CONFIG_DRIVER_SBUS + -1 value tcx-driver-fcode + " QEMU,tcx.bin" $encode-file to tcx-driver-fcode +[THEN]
Modified: trunk/openbios-devel/arch/sparc32/tree.fs ============================================================================== --- trunk/openbios-devel/arch/sparc32/tree.fs Sat Jul 27 13:21:59 2013 (r1192) +++ trunk/openbios-devel/arch/sparc32/tree.fs Sat Jul 27 13:22:02 2013 (r1193) @@ -1,3 +1,4 @@ +include config.fs
" /" find-device 2 encode-int " #address-cells" property
Modified: trunk/openbios-devel/drivers/build.xml ============================================================================== --- trunk/openbios-devel/drivers/build.xml Sat Jul 27 13:21:59 2013 (r1192) +++ trunk/openbios-devel/drivers/build.xml Sat Jul 27 13:22:02 2013 (r1193) @@ -29,8 +29,9 @@ <object source="pci.fs" condition="DRIVER_PCI"/> <object source="sbus.fs" condition="DRIVER_SBUS"/> <object source="esp.fs" condition="DRIVER_ESP"/> - <object source="tcx.fs" condition="DRIVER_SBUS"/> <object source="vga.fs" condition="DRIVER_VGA"/> </dictionary>
+ <fcode source="tcx.fs" name="QEMU,tcx.bin" condition="DRIVER_SBUS" /> + </build>
Modified: trunk/openbios-devel/drivers/sbus.c ============================================================================== --- trunk/openbios-devel/drivers/sbus.c Sat Jul 27 13:21:59 2013 (r1192) +++ trunk/openbios-devel/drivers/sbus.c Sat Jul 27 13:22:02 2013 (r1193) @@ -342,7 +342,10 @@ }
bind_func("hw-set-color", tcx_hw_set_color); - feval("['] qemu-tcx-driver-init is-install"); + + /* Currently we don't have an SBus probe routine, so execute FCode + directly */ + feval("['] tcx-driver-fcode 2 cells + 1 byte-load");
chosen = find_dev("/chosen"); push_str(path);
Modified: trunk/openbios-devel/drivers/tcx.fs ============================================================================== --- trunk/openbios-devel/drivers/tcx.fs Sat Jul 27 13:21:59 2013 (r1192) +++ trunk/openbios-devel/drivers/tcx.fs Sat Jul 27 13:22:02 2013 (r1193) @@ -5,9 +5,42 @@ \ the QEMU TCX graphics card. \
-: qemu-tcx-driver-init ( -- ) +fcode-version3 + +\ +\ Instead of using fixed values for the framebuffer address and the width +\ and height, grab the ones passed in by QEMU/generated by OpenBIOS +\ + +: qemu-video-addr + " qemu-video-addr" $find if + cell+ @ + then +; + +: qemu-video-width + " qemu-video-width" $find if + cell+ @ + then +; + +: qemu-video-height + " qemu-video-height" $find if + cell+ @ + then +; + +: qemu-tcx-driver-install ( -- ) qemu-video-addr to frame-buffer-adr default-font set-font qemu-video-width qemu-video-height over char-width / over char-height / fb8-install ; + +: qemu-tcx-driver-init + ['] qemu-tcx-driver-install is-install +; + +qemu-tcx-driver-init + +end0