qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Olivier Danet <odanet@caramail.com>
To: qemu-devel@nongnu.org, Artyom Tarasenko <atar4qemu@gmail.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM
Date: Mon, 30 Dec 2013 00:51:18 +0100	[thread overview]
Message-ID: <52C0B576.6060102@caramail.com> (raw)

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);
+
      /* Calculate checksum */
      tmp = 0;
      tmpptr = (uint8_t *)header;
-- 
1.8.1.5

             reply	other threads:[~2013-12-29 23:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-29 23:51 Olivier Danet [this message]
2013-12-30 14:02 ` [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM 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 ` [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=52C0B576.6060102@caramail.com \
    --to=odanet@caramail.com \
    --cc=atar4qemu@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --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).