[OpenBIOS] [PATCHv2 24/25] libopenbios: remove conditional logic from go()

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu Sep 8 09:01:03 CEST 2016


Now that each loader sets up its own context, there is no longer any need
for conditional logic in go().

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 libopenbios/initprogram.c |   17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/libopenbios/initprogram.c b/libopenbios/initprogram.c
index 1008a90..e87f930 100644
--- a/libopenbios/initprogram.c
+++ b/libopenbios/initprogram.c
@@ -124,22 +124,7 @@ void go(void)
 
 	printk("\nJumping to entry point " FMT_ucellx " for type " FMT_ucellx "...\n", address, type);
 
-	switch (type) {
-		default:
-			/* Start native binary */
-			image_retval = start_elf((unsigned long)address);
-			break;
-
-		case 0x10:
-			/* Start Fcode image */
-			image_retval = start_elf((unsigned long)&init_fcode_context);
-			break;
-
-		case 0x11:
-			/* Start Forth image */
-			image_retval = start_elf((unsigned long)&init_forth_context);
-			break;
-	}
+	image_retval = start_elf((unsigned long)address);
 
 	printk("Image returned with return value %#x\n", image_retval);
 }
-- 
1.7.10.4




More information about the OpenBIOS mailing list