From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxQ8Z-00032J-Qb for qemu-devel@nongnu.org; Sun, 29 Dec 2013 18:51:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VxQ8T-00051U-00 for qemu-devel@nongnu.org; Sun, 29 Dec 2013 18:51:15 -0500 Received: from mout.gmx.net ([212.227.15.19]:50378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VxQ8S-00051O-Mx for qemu-devel@nongnu.org; Sun, 29 Dec 2013 18:51:08 -0500 Received: from [192.168.1.24] ([109.223.38.46]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Ljqgb-1VQZHv1riL-00bwjS for ; Mon, 30 Dec 2013 00:51:06 +0100 Message-ID: <52C0B576.6060102@caramail.com> Date: Mon, 30 Dec 2013 00:51:18 +0100 From: Olivier Danet MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Artyom Tarasenko , Mark Cave-Ayland 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 --- 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