diff options
-rw-r--r-- | arclib/prom.c | 13 | ||||
-rw-r--r-- | common/prom.h | 4 | ||||
-rw-r--r-- | ext2load/loader.c | 6 | ||||
-rw-r--r-- | tip22/tftpload.c | 4 |
4 files changed, 22 insertions, 5 deletions
diff --git a/arclib/prom.c b/arclib/prom.c index 27a8e69..87a2bf3 100644 --- a/arclib/prom.c +++ b/arclib/prom.c @@ -7,6 +7,19 @@ #include <stdlib.h> #include <subarch.h> +void prom_flush_cache_all(void ) { + ArcFlushAllCaches(); +} + +void prom_restart(void ) { + ArcRestart(); +} + +void prom_return_interactive(void ) { + ArcEnterInteractiveMode(); +} + + void prom_wait(const char *prompt) { int ch; diff --git a/common/prom.h b/common/prom.h index 053652c..cfd255b 100644 --- a/common/prom.h +++ b/common/prom.h @@ -1,4 +1,8 @@ +void prom_restart(void ); +void prom_return_interactive(void ); +void prom_flush_cache_all(void ); + void prom_fatal(const char *message, ...); void prom_wait(const char *prompt); diff --git a/ext2load/loader.c b/ext2load/loader.c index f4c06c6..1995b44 100644 --- a/ext2load/loader.c +++ b/ext2load/loader.c @@ -538,12 +538,12 @@ void _start(LONG argc, CHAR *argv[], CHAR *envp[]) if( kernel_entry64 ) { if(is64==0){ printf("Starting ELF32 kernel\n\r"); - ArcFlushAllCaches(); + prom_flush_cache_all(); ((void (*)(int argc, CHAR * argv[], CHAR * envp[])) kernel_entry32)(nargc ,nargv, envp); } else { printf("Starting ELF64 kernel\n\r"); - ArcFlushAllCaches(); + prom_flush_cache_all(); _start64(nargc, nargv, envp, &kernel_entry64); } } else { @@ -552,5 +552,5 @@ void _start(LONG argc, CHAR *argv[], CHAR *envp[]) /* Not likely to get back here in a functional state, but what the heck */ prom_wait("\n\r--- Press <spacebar> to restart ---"); - ArcRestart(); + prom_restart(); } diff --git a/tip22/tftpload.c b/tip22/tftpload.c index c438401..2d649a0 100644 --- a/tip22/tftpload.c +++ b/tip22/tftpload.c @@ -266,7 +266,7 @@ void _start(LONG argc, CHAR * argv[], CHAR * envp[]) #endif /* Finally jump into the kernel */ printf("Starting kernel...\n\r"); - ArcFlushAllCaches(); + prom_flush_cache_all(); if( kernel_entry ) (*kernel_entry)(nargc ,nargv, envp); else @@ -275,5 +275,5 @@ void _start(LONG argc, CHAR * argv[], CHAR * envp[]) /* Not likely to get back here in a functional state, * but what the heck */ prom_wait("\n\r--- Press <spacebar> to restart ---"); - ArcRestart(); + prom_restart(); } |