diff options
author | bcollins <tailor@grayson> | 2006-06-01 13:19:32 -0400 |
---|---|---|
committer | Ben Collins <bcollins@ubuntu.com> | 2006-06-01 13:19:32 -0400 |
commit | aa6b1099e27d5d77324e6fef53fbe6779b85f977 (patch) | |
tree | 86d302b279a20220c5a30a80913734ca77d6fe20 | |
parent | c0d05e7067cb73280b5bc5e3e14e7aa21fcffac5 (diff) | |
download | silo-aa6b1099e27d5d77324e6fef53fbe6779b85f977.tar.gz |
[silo @ 141]
Add printing of the initrd physical address for debug purposes.#
-rw-r--r-- | second/main.c | 5 | ||||
-rw-r--r-- | second/memory.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/second/main.c b/second/main.c index 959c4cd..e00ae85 100644 --- a/second/main.c +++ b/second/main.c @@ -834,6 +834,8 @@ static int get_params (char **device, int *part, char **kname, char **proll, static void initrd_lenfunc (int len, char **filebuffer, char **filelimit) { + extern unsigned long long initrd_phys; + initrd_start = memory_find ((len + 16383) & ~16383); if (!initrd_start) { fatal ("You do not have enough continuous available memory for such initial ramdisk."); @@ -842,7 +844,8 @@ static void initrd_lenfunc (int len, char **filebuffer, char **filelimit) initrd_size = len; *filebuffer = initrd_start; *filelimit = initrd_start + ((len + 16383) & ~16383); - printf("Loading initial ramdisk (%d bytes at 0x%x)...\n", len, initrd_start); + printf("Loading initial ramdisk (%d bytes at 0x%llx phys, 0x%x virt)...\n", len, + initrd_phys, initrd_start); } static int parse_executable (char *base, int image_len, unsigned int *poff, diff --git a/second/memory.c b/second/memory.c index 985bede..72b619f 100644 --- a/second/memory.c +++ b/second/memory.c @@ -210,6 +210,8 @@ inline void sun4m_set_direct (unsigned long l, unsigned long set) #define ASI_ITLB_DATA_ACCESS 0x55 #endif +unsigned long long initrd_phys; + unsigned long sun4m_initrd_pa; unsigned long sun4m_initrd_va; @@ -257,6 +259,7 @@ char *memory_find (int len) unsigned long lev1; int i; sun4m_initrd_pa = (unsigned long)beg; + initrd_phys = (unsigned long long)(unsigned long)beg; lev1 = sun4m_get_lev1(); for (i = 0x60; i < 0xa0; i++) if (!(sun4m_get_direct(lev1 + 4*i) & 3)) @@ -365,7 +368,7 @@ static char *sun4u_memory_find (unsigned int len, int is_kernel) } else { sun4u_initrd_len = len; sun4u_initrd_virt = virt; - sun4u_initrd_phys = phys; + sun4u_initrd_phys = initrd_phys = phys; } __asm __volatile("\n\ |