qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Su Hang <suhang16@mails.ucas.ac.cn>
Cc: darcysail@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v7 1/2] Implement .hex file loader
Date: Thu, 10 May 2018 15:47:01 +0100	[thread overview]
Message-ID: <20180510144701.GB7734@stefanha-x1.localdomain> (raw)
In-Reply-To: <1525936711-24538-2-git-send-email-suhang16@mails.ucas.ac.cn>

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

On Thu, May 10, 2018 at 03:18:30PM +0800, Su Hang wrote:

Great, this is getting close.  A few more comments below...

>      if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64) && kernel_size < 0) {
>          kernel_size = load_aarch64_image(info->kernel_filename,
>                                           info->loader_start, &entry, as);
>          is_linux = 1;
> -    } else if (kernel_size < 0) {
> -        /* 32-bit ARM */
> +    }
> +    if (kernel_size < 0) {
> +        /* 32-bit ARM binary file */

Why is this change necessary?  A 64-bit machine previously didn't
attempt a 32-bit kernel load.  I'm not sure why you changed this
behavior.

> diff --git a/include/hw/loader.h b/include/hw/loader.h
> index 5ed3fd8ae67a..ba82c9686ba3 100644
> --- a/include/hw/loader.h
> +++ b/include/hw/loader.h
> @@ -28,6 +28,19 @@ ssize_t load_image_size(const char *filename, void *addr, size_t size);
>  int load_image_targphys_as(const char *filename,
>                             hwaddr addr, uint64_t max_sz, AddressSpace *as);
>  
> +/**load_image_targphys_hex_as:

s/load_image_targphys_hex_as/load_targphys_hex_as/

> + * @filename: Path to the .hex file
> + * @entry: Store the entry point get from .hex file

s/get from/given by the/g

> + * @max_sz: The maximum size of the .hex file to load

This argument does not exist, please drop it.

> @@ -241,6 +254,8 @@ void hmp_info_roms(Monitor *mon, const QDict *qdict);
>      rom_add_file(_f, NULL, _a, _i, false, NULL, _as)
>  #define rom_add_blob_fixed_as(_f, _b, _l, _a, _as)      \
>      rom_add_blob(_f, _b, _l, _l, _a, NULL, NULL, NULL, _as, true)
> +#define rom_add_hex_blob_as(_f, _b, _l, _a, _as)      \
> +    rom_add_blob(_f, _b, _l, _l, _a, NULL, NULL, NULL, _as, true)

This macro is equivalent to rom_add_blob_fixed_as().  Why not use
rom_add_blob_fixed_as()?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2018-05-10 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  7:18 [Qemu-devel] [PATCH v7 0/2] Implement Hex file loader and add test case Su Hang
2018-05-10  7:18 ` [Qemu-devel] [PATCH v7 1/2] Implement .hex file loader Su Hang
2018-05-10 14:47   ` Stefan Hajnoczi [this message]
2018-05-13 22:21   ` Julia Suvorova
2018-05-14  1:51     ` Su Hang
2018-05-10  7:18 ` [Qemu-devel] [PATCH v7 2/2] Add QTest testcase for the Intel Hexadecimal Object File Loader Su Hang
2018-05-10 14:31   ` Stefan Hajnoczi
2018-05-14  6:57   ` Steffen Görtz
2018-05-14 14:14     ` Stefan Hajnoczi
2018-05-16  5:26     ` Su Hang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180510144701.GB7734@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=darcysail@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=suhang16@mails.ucas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).