qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Olivier Danet <odanet@caramail.com>
Cc: qemu-devel@nongnu.org, Artyom Tarasenko <atar4qemu@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM
Date: Thu, 20 Feb 2014 08:46:00 +0000	[thread overview]
Message-ID: <5305C0C8.8060307@ilande.co.uk> (raw)
In-Reply-To: <52C0B576.6060102@caramail.com>

On 29/12/13 23:51, Olivier Danet wrote:

> On SparcStations, the HostID field in the NVRAM is equal to the
> last three bytes of the MAC address (which is also stored in the NVRAM).
>
> This constant is used as an identification/serial number on Solaris.
>
> signed-off-by : Olivier Danet <odanet@caramail.com>
> ---
> include/hw/nvram/openbios_firmware_abi.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/hw/nvram/openbios_firmware_abi.h
> b/include/hw/nvram/openbios_firmware_abi.h
> index 5e6e5d4..492c8d5 100644
> --- a/include/hw/nvram/openbios_firmware_abi.h
> +++ b/include/hw/nvram/openbios_firmware_abi.h
> @@ -62,6 +62,8 @@ Sun_init_header(struct Sun_nvram *header, const
> uint8_t *macaddr, int machine_id
> header->type = 1;
> header->machine_id = machine_id & 0xff;
> memcpy(&header->macaddr, macaddr, 6);
> + memcpy(&header->hostid , &macaddr[3],3);

I think there is some whitespace damage on this patch? At least I 
couldn't apply it as is :/  Also the lack of a space after the final 
comma on the line above looks suspicious too... have you tried running 
scripts/checkpatch.pl on the resulting diffs?

> +
> /* Calculate checksum */
> tmp = 0;
> tmpptr = (uint8_t *)header;

Apart from the whitespace issues, the basic patch looks fine though.


ATB,

Mark.

      parent reply	other threads:[~2014-02-20  8:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-29 23:51 [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM Olivier Danet
2013-12-30 14:02 ` Artyom Tarasenko
2014-02-16 23:13   ` [Qemu-devel] [PATCH] Sun4m: " Olivier Danet
2014-02-23 17:32     ` Mark Cave-Ayland
2014-02-20  8:46 ` Mark Cave-Ayland [this message]

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=5305C0C8.8060307@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=atar4qemu@gmail.com \
    --cc=odanet@caramail.com \
    --cc=qemu-devel@nongnu.org \
    /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).