* [Qemu-devel] [5516] ETRAX-FS: Add support for passing kernel command lines
@ 2008-10-22 19:58 Edgar E. Iglesias
0 siblings, 0 replies; only message in thread
From: Edgar E. Iglesias @ 2008-10-22 19:58 UTC (permalink / raw)
To: qemu-devel
Revision: 5516
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5516
Author: edgar_igl
Date: 2008-10-22 19:58:32 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
ETRAX-FS: Add support for passing kernel command lines
Modified Paths:
--------------
trunk/hw/etraxfs.c
Modified: trunk/hw/etraxfs.c
===================================================================
--- trunk/hw/etraxfs.c 2008-10-22 19:35:08 UTC (rev 5515)
+++ trunk/hw/etraxfs.c 2008-10-22 19:58:32 UTC (rev 5516)
@@ -119,11 +119,13 @@
}
if (kernel_filename) {
- uint64_t entry;
+ uint64_t entry, high;
+ int kcmdline_len;
+
/* Boots a kernel elf binary, os/linux-2.6/vmlinux from the axis
devboard SDK. */
kernel_size = load_elf(kernel_filename, -0x80000000LL,
- &entry, NULL, NULL);
+ &entry, NULL, &high);
bootstrap_pc = entry;
if (kernel_size < 0) {
/* Takes a kimage from the axis devboard SDK. */
@@ -132,6 +134,17 @@
env->regs[9] = 0x40004000 + kernel_size;
}
env->regs[8] = 0x56902387; /* RAM init magic. */
+
+ if (kernel_cmdline && (kcmdline_len = strlen(kernel_cmdline))) {
+ if (kcmdline_len > 256) {
+ fprintf(stderr, "Too long CRIS kernel cmdline (max 256)\n");
+ exit(1);
+ }
+ pstrcpy_targphys(high, 256, kernel_cmdline);
+ /* Let the kernel know we are modifying the cmdline. */
+ env->regs[10] = 0x87109563;
+ env->regs[11] = high;
+ }
}
env->pc = bootstrap_pc;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-22 19:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22 19:58 [Qemu-devel] [5516] ETRAX-FS: Add support for passing kernel command lines Edgar E. Iglesias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).