[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] sh4: r2d --append option support
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] sh4: r2d --append option support |
Date: |
Tue, 3 Mar 2009 07:20:29 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Feb 11, 2009 at 10:15:52PM +0900, address@hidden wrote:
> Add linux kernel command line ("--append" option) support.
> Fix kernel loading address to appropriate position when --append used.
> Using --kernel but --append case is left untouched for backward compatibility.
>
> Signed-off-by: Takashi YOSHII <address@hidden>
> ---
> I found this has not been posted as a patch to apply.
> I hope this be merged into the branch(if any:) for next stable release.
> /yoshii
> ---
> hw/r2d.c | 13 +++++++++----
> 1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/hw/r2d.c b/hw/r2d.c
> index e6b2bf4..7dcb723 100644
> --- a/hw/r2d.c
> +++ b/hw/r2d.c
> @@ -233,20 +233,25 @@ static void r2d_init(ram_addr_t ram_size, int
> vga_ram_size,
> pci_nic_init(pci, &nd_table[i], -1, "ne2k_pci");
>
> /* Todo: register on board registers */
> - {
> + if (kernel_filename) {
> int kernel_size;
> /* initialization which should be done by firmware */
> stl_phys(SH7750_BCR1, 1<<3); /* cs3 SDRAM */
> stw_phys(SH7750_BCR2, 3<<(3*2)); /* cs3 32bit */
>
> - kernel_size = load_image(kernel_filename, phys_ram_base);
> + if (kernel_cmdline) {
> + kernel_size = load_image(kernel_filename, phys_ram_base + 0x80000);
> + env->pc = (SDRAM_BASE + 0x80000) | 0xa0000000;
> + pstrcpy(phys_ram_base + 0x10100, 256, kernel_cmdline);
You should use pstrcpy_targphys() instead and remove phys_ram_base.
Otherwise looks good.
> + } else {
> + kernel_size = load_image(kernel_filename, phys_ram_base);
> + env->pc = SDRAM_BASE | 0xa0000000; /* Start from P2 area */
> + }
>
> if (kernel_size < 0) {
> fprintf(stderr, "qemu: could not load kernel '%s'\n",
> kernel_filename);
> exit(1);
> }
> -
> - env->pc = SDRAM_BASE | 0xa0000000; /* Start from P2 area */
> }
> }
>
> --
> 1.5.6.3
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net
- Re: [Qemu-devel] sh4: r2d --append option support,
Aurelien Jarno <=