From patchwork Wed Aug 31 03:00:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 664347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sP99h4BCNz9s9W for ; Wed, 31 Aug 2016 13:00:24 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sP99h3KL8zDrj2 for ; Wed, 31 Aug 2016 13:00:24 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sP99c1tcNzDrhc for ; Wed, 31 Aug 2016 13:00:19 +1000 (AEST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89FA081127; Wed, 31 Aug 2016 03:00:17 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7V30Eia029249; Tue, 30 Aug 2016 23:00:15 -0400 From: Thomas Huth To: slof@lists.ozlabs.org Date: Wed, 31 Aug 2016 05:00:14 +0200 Message-Id: <1472612414-2382-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 31 Aug 2016 03:00:17 +0000 (UTC) Subject: [SLOF] [PATCH] Do not include the FCode evaluator by default anymore X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Commit 2fed5652819ad26627a8 ("Always include evaluator, move framebuffer token init to fbuffer.fs") made sure that the FCode evaluator is always included, during each boot cycle. The basic idea was that we would soon be starting to support PCI cards with FCode drivers on them. However, this has never happened, and so this change was in vain. The bad thing is now that the inclusion of the FCode evaluator also takes a lot of precious boot time, e.g. when running in QEMU TCG mode, it is more than a second. So to be able to boot faster again, disable the FCode evaluator by default again and put it into the ROM-fs instead (so it still can be loaded manually with "include evaluator.fs" if necessary). Signed-off-by: Thomas Huth Reviewed-by: Nikunj A Dadhania --- board-js2x/slof/Makefile | 1 + board-js2x/slof/OF.fs | 4 --- board-js2x/slof/tree.fs | 7 ++++ board-qemu/slof/Makefile | 1 + board-qemu/slof/OF.fs | 4 --- slof/fs/fbuffer.fs | 54 ----------------------------- slof/fs/fcode/tokens.fs | 90 ++++++++++++++++++++++++------------------------ 7 files changed, 54 insertions(+), 107 deletions(-) diff --git a/board-js2x/slof/Makefile b/board-js2x/slof/Makefile index 4cdd5fa..d441b5a 100644 --- a/board-js2x/slof/Makefile +++ b/board-js2x/slof/Makefile @@ -89,6 +89,7 @@ OF_FFS_FILES = \ $(SLOFCMNDIR)/fs/pci-config-bridge.fs \ $(SLOFCMNDIR)/fs/update_flash.fs \ $(SLOFCMNDIR)/fs/xmodem.fs \ + $(SLOFCMNDIR)/fs/fcode/evaluator.fs \ $(SLOFCMNDIR)/fs/devices/pci-device_10de_0141.fs \ $(SLOFCMNDIR)/fs/devices/pci-class_02.fs \ $(SLOFBRDDIR)/default-font.bin diff --git a/board-js2x/slof/OF.fs b/board-js2x/slof/OF.fs index 3e37735..a51f473 100644 --- a/board-js2x/slof/OF.fs +++ b/board-js2x/slof/OF.fs @@ -209,10 +209,6 @@ d# 14318378 VALUE tb-frequency \ default value - needed for "ms" to work #include -270 cp - -#include - 280 cp \ rtas-config is not used diff --git a/board-js2x/slof/tree.fs b/board-js2x/slof/tree.fs index 040d99f..1f924ea 100644 --- a/board-js2x/slof/tree.fs +++ b/board-js2x/slof/tree.fs @@ -140,6 +140,13 @@ set-node #include "ht.fs" +6a0 cp +get-node device-end +\ At this point the SAS controller has been detected and we know if it +\ is a bimini or js21. If it is bimini the fcode evaluator is included +bimini? ?include evaluator.fs +set-node + 6b0 cp u4? ?include attu.fs diff --git a/board-qemu/slof/Makefile b/board-qemu/slof/Makefile index 9cd6c0a..940a15a 100644 --- a/board-qemu/slof/Makefile +++ b/board-qemu/slof/Makefile @@ -101,6 +101,7 @@ OF_FFS_FILES = \ $(SLOFCMNDIR)/fs/scsi-host-helpers.fs \ $(SLOFCMNDIR)/fs/scsi-probe-helpers.fs \ $(SLOFCMNDIR)/fs/scsi-support.fs \ + $(SLOFCMNDIR)/fs/fcode/evaluator.fs \ $(SLOFBRDDIR)/default-font.bin \ $(SLOFBRDDIR)/pci-phb.fs \ $(SLOFBRDDIR)/rtas.fs \ diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs index 784f2bd..5a4368f 100644 --- a/board-qemu/slof/OF.fs +++ b/board-qemu/slof/OF.fs @@ -93,10 +93,6 @@ d# 512000000 VALUE tb-frequency \ default value - needed for "ms" to work #include -270 cp - -#include - 2e0 cp #include diff --git a/slof/fs/fbuffer.fs b/slof/fs/fbuffer.fs index 4704608..bfe60eb 100644 --- a/slof/fs/fbuffer.fs +++ b/slof/fs/fbuffer.fs @@ -205,60 +205,6 @@ CREATE bitmap-buffer 400 4 * allot screen-width screen-depth * to screen-line-bytes ; - -\ Install display related FCODE evaluator tokens -: fb8-set-tokens ( -- ) - ['] is-install 0 11C set-token - ['] is-remove 0 11D set-token - ['] is-selftest 0 11E set-token - - ['] #lines 0 150 set-token - ['] #columns 0 151 set-token - ['] line# 0 152 set-token - ['] column# 0 153 set-token - ['] inverse? 0 154 set-token - ['] inverse-screen? 0 155 set-token - ['] draw-character 0 157 set-token - ['] reset-screen 0 158 set-token - ['] toggle-cursor 0 159 set-token - ['] erase-screen 0 15A set-token - ['] blink-screen 0 15B set-token - ['] invert-screen 0 15C set-token - ['] insert-characters 0 15D set-token - ['] delete-characters 0 15E set-token - ['] insert-lines 0 15F set-token - ['] delete-lines 0 160 set-token - ['] draw-logo 0 161 set-token - ['] frame-buffer-adr 0 162 set-token - ['] screen-height 0 163 set-token - ['] screen-width 0 164 set-token - ['] window-top 0 165 set-token - ['] window-left 0 166 set-token - \ ['] foreground-color 0 168 set-token \ 16-color extension - n/a - \ ['] background-color 0 169 set-token \ 16-color extension - n/a - ['] default-font 0 16A set-token - ['] set-font 0 16B set-token - ['] char-height 0 16C set-token - ['] char-width 0 16D set-token - ['] >font 0 16E set-token - ['] fontbytes 0 16F set-token - - ['] fb8-draw-character 0 180 set-token - ['] fb8-reset-screen 0 181 set-token - ['] fb8-toggle-cursor 0 182 set-token - ['] fb8-erase-screen 0 183 set-token - ['] fb8-blink-screen 0 184 set-token - ['] fb8-invert-screen 0 185 set-token - ['] fb8-insert-characters 0 186 set-token - ['] fb8-delete-characters 0 187 set-token - ['] fb8-insert-lines 0 188 set-token - ['] fb8-delete-lines 0 189 set-token - ['] fb8-draw-logo 0 18A set-token - ['] fb8-install 0 18B set-token -; -fb8-set-tokens - - \ \\\\\\\\\\\\ Debug Stuff \\\\\\\\\\\\\\\\ : fb8-dump-bitmap cr char-height 0 ?do char-width 0 ?do dup c@ if ." @" else ." ." then 1+ loop cr loop drop ; diff --git a/slof/fs/fcode/tokens.fs b/slof/fs/fcode/tokens.fs index 3efc17e..9e6f6bd 100644 --- a/slof/fs/fcode/tokens.fs +++ b/slof/fs/fcode/tokens.fs @@ -297,9 +297,9 @@ reset-token-table ' model 0 119 set-token ' device-type 0 11A set-token ' parse-2int 0 11B set-token -\ ' is-install 0 11C set-token \ Will be set by framebuffer code -\ ' is-remove 0 11D set-token \ Will be set by framebuffer code -\ ' is-selftest 0 11E set-token \ Will be set by framebuffer code +' is-install 0 11C set-token \ for framebuffer code +' is-remove 0 11D set-token \ for framebuffer code +' is-selftest 0 11E set-token \ for framebuffer code ' new-device 0 11F set-token ' diagnostic-mode? 0 120 set-token ' display-status 0 121 set-token \ Maybe obsolete @@ -321,56 +321,56 @@ reset-token-table \ Tokens 0x132 to 0x14f are reserved -\ The following tokens will be set by the framebuffer code: -\ ' #lines 0 150 set-token -\ ' #columns 0 151 set-token -\ ' line# 0 152 set-token -\ ' column# 0 153 set-token -\ ' inverse? 0 154 set-token -\ ' inverse-screen? 0 155 set-token +\ The following tokens are for the framebuffer code: +' #lines 0 150 set-token +' #columns 0 151 set-token +' line# 0 152 set-token +' column# 0 153 set-token +' inverse? 0 154 set-token +' inverse-screen? 0 155 set-token \ ' frame-buffer-busy 0 156 set-token \ Historical, not supported -\ ' draw-character 0 157 set-token -\ ' reset-screen 0 158 set-token -\ ' toggle-cursor 0 159 set-token -\ ' erase-screen 0 15A set-token -\ ' blink-screen 0 15B set-token -\ ' invert-screen 0 15C set-token -\ ' insert-characters 0 15D set-token -\ ' delete-characters 0 15E set-token -\ ' insert-lines 0 15F set-token -\ ' delete-lines 0 160 set-token -\ ' draw-logo 0 161 set-token -\ ' frame-buffer-adr 0 162 set-token -\ ' screen-height 0 163 set-token -\ ' screen-width 0 164 set-token -\ ' window-top 0 165 set-token -\ ' window-left 0 166 set-token +' draw-character 0 157 set-token +' reset-screen 0 158 set-token +' toggle-cursor 0 159 set-token +' erase-screen 0 15A set-token +' blink-screen 0 15B set-token +' invert-screen 0 15C set-token +' insert-characters 0 15D set-token +' delete-characters 0 15E set-token +' insert-lines 0 15F set-token +' delete-lines 0 160 set-token +' draw-logo 0 161 set-token +' frame-buffer-adr 0 162 set-token +' screen-height 0 163 set-token +' screen-width 0 164 set-token +' window-top 0 165 set-token +' window-left 0 166 set-token \ ' 0 167 set-token \ Reserved \ ' foreground-color 0 168 set-token \ From 16-color recommended practice \ ' background-color 0 169 set-token \ From 16-color recommended practice -\ ' default-font 0 16A set-token -\ ' set-font 0 16B set-token -\ ' char-height 0 16C set-token -\ ' char-width 0 16D set-token -\ ' >font 0 16E set-token -\ ' fontbytes 0 16F set-token +' default-font 0 16A set-token +' set-font 0 16B set-token +' char-height 0 16C set-token +' char-width 0 16D set-token +' >font 0 16E set-token +' fontbytes 0 16F set-token \ Tokens 0x170 to 0x17C are obsolete fb1 functions \ Tokens 0x17D to 0x17F are reserved -\ The following tokens will be set by the framebuffer code, too: -\ ' fb8-draw-character 0 180 set-token -\ ' fb8-reset-screen 0 181 set-token -\ ' fb8-toggle-cursor 0 182 set-token -\ ' fb8-erase-screen 0 183 set-token -\ ' fb8-blink-screen 0 184 set-token -\ ' fb8-invert-screen 0 185 set-token -\ ' fb8-insert-characters 0 186 set-token -\ ' fb8-delete-characters 0 187 set-token -\ ' fb8-insert-lines 0 188 set-token -\ ' fb8-delete-lines 0 189 set-token -\ ' fb8-draw-logo 0 18A set-token -\ ' fb8-install 0 18B set-token +\ The following tokens are for the framebuffer code, too: +' fb8-draw-character 0 180 set-token +' fb8-reset-screen 0 181 set-token +' fb8-toggle-cursor 0 182 set-token +' fb8-erase-screen 0 183 set-token +' fb8-blink-screen 0 184 set-token +' fb8-invert-screen 0 185 set-token +' fb8-insert-characters 0 186 set-token +' fb8-delete-characters 0 187 set-token +' fb8-insert-lines 0 188 set-token +' fb8-delete-lines 0 189 set-token +' fb8-draw-logo 0 18A set-token +' fb8-install 0 18B set-token \ Tokens 0x18C to 0x18F are reserved \ Tokens 0x190 to 0x196 are obsolete VMEbus tokens