From: Artyom Tarasenko <atar4qemu@gmail.com>
To: Olivier Danet <odanet@caramail.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM
Date: Mon, 30 Dec 2013 15:02:34 +0100 [thread overview]
Message-ID: <CACXAS8Dnch-evCwFBECagYEdX7QttmF4TSwfDMGbeFc1XPM=Pg@mail.gmail.com> (raw)
In-Reply-To: <52C0B576.6060102@caramail.com>
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;
> --
> 1.8.1.5
--
Regards,
Artyom Tarasenko
linux/sparc and solaris/sparc under qemu blog:
http://tyom.blogspot.com/search/label/qemu
next prev parent reply other threads:[~2013-12-30 14:03 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 [this message]
2014-02-16 23:13 ` [Qemu-devel] [PATCH] Sun4m: " Olivier Danet
2014-02-23 17:32 ` Mark Cave-Ayland
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='CACXAS8Dnch-evCwFBECagYEdX7QttmF4TSwfDMGbeFc1XPM=Pg@mail.gmail.com' \
--to=atar4qemu@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--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).