qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Sun4m: Set HostID in NVRAM


From: Olivier Danet
Subject: [Qemu-devel] [PATCH] Sun4m: Set HostID in NVRAM
Date: Mon, 17 Feb 2014 00:13:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Ping.
Repost !

On 30/12/2013 15:02, Artyom Tarasenko wrote:
On Mon, Dec 30, 2013 at 12:51 AM, Olivier Danet <address@hidden> 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 <address@hidden>
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 <address@hidden>

---
  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 via email to

[Prev in Thread] Current Thread [Next in Thread]