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: Blue Swirl <blauwirbel@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Artyom Tarasenko <atar4qemu@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] Sun4m: Set HostID in NVRAM
Date: Sun, 23 Feb 2014 17:32:02 +0000	[thread overview]
Message-ID: <530A3092.8080307@ilande.co.uk> (raw)
In-Reply-To: <53014600.9030309@caramail.com>

On 16/02/14 23:13, Olivier Danet wrote:

> Ping.
> Repost !
>
> On 30/12/2013 15:02, Artyom Tarasenko wrote:
>> On Mon, Dec 30, 2013 at 12:51 AM, Olivier Danet <odanet@caramail.com>
>> 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>
>> Corresponds with http://www.squirrel.com/squirrel/sun-nvram-hostid.faq
>> and Solaris 9 detects the hostid after this patch fine, so
>>
>> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.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);
>>> +
>>> /* Calculate checksum */
>>> tmp = 0;
>>> tmpptr = (uint8_t *)header;
>>> --

Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

I've applied this to my qemu-sparc branch.


ATB,

Mark.

  reply	other threads:[~2014-02-23 17:34 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 [this message]
2014-02-20  8:46 ` [Qemu-devel] [PATCH] sparc: " Mark Cave-Ayland

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=530A3092.8080307@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=atar4qemu@gmail.com \
    --cc=blauwirbel@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).