diff options
author | Florian Lohoff <flo@rfc822.org> | 2008-10-04 16:08:49 +0000 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2009-04-26 15:26:26 +0200 |
commit | 88aacc5ec96304a23c4d33ac3cdc71985f099c72 (patch) | |
tree | 414c5902472e83ad988fc3db247188700b4e9f48 /common | |
parent | ae4dcabd39938e93afa1fb095ed5421e92c10d7d (diff) |
Move memory init, Fatal and Wait into prom specific
Abstract memory initialization into prom specific code. Put Fatal and
Wait into prom specific code.
Diffstat (limited to 'common')
-rw-r--r-- | common/prom.h | 9 | ||||
-rw-r--r-- | common/subarch.h | 39 |
2 files changed, 10 insertions, 38 deletions
diff --git a/common/prom.h b/common/prom.h index b347d36..053652c 100644 --- a/common/prom.h +++ b/common/prom.h @@ -1,4 +1,13 @@ +void prom_fatal(const char *message, ...); +void prom_wait(const char *prompt); + +/* + * Gets called shortly after prom_init to intialize the malloc + * subsystem based on the proms information about memory layout + * + */ +void prom_init_malloc(void ); /* * Open may be used to open "partitions" passed in by name from the prom. It is the diff --git a/common/subarch.h b/common/subarch.h index 788cc8d..28e2d1d 100644 --- a/common/subarch.h +++ b/common/subarch.h @@ -9,43 +9,6 @@ #define PAGE_SIZE 4096 #define STACK_PAGES 16 - -/* supported subarches */ -#define IP22 0 -#define IP32 1 - -/* - * Reserve this memory for loading kernel - * Don't put loader structures there because they would be overwritten - * - * We put the loader right after the kernel so you won't have the - * full reserved space since the prom puts the stack right below - * the loader. - */ -struct kernel_load_block { - uint32_t base; - uint32_t reserved; -}; - -struct kernel_load_block kernel_load[] = { - { /* IP22 */ - .base = 0x88002000, - .reserved = 0x1700000, - }, - { /* IP32 */ - .base = 0x80004000, - .reserved = 0x1400000, - }, -}; - -/* we filter these out of the command line */ -char* env_vars[] = { "ConsoleIn=", - "ConsoleOut=", - "OSLoader=", - "OSLoadPartition=", - "OSLoadFilename=", - "OSLoadOptions=", - }; -#define NENTS(foo) ((sizeof((foo)) / (sizeof((foo[0]))))) +#define KSEG0ADDR(addr) (((addr) & 0x1fffffff) | 0x80000000) #endif |