From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFAsM-0004P6-41 for qemu-devel@nongnu.org; Sun, 16 Feb 2014 18:11:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFAsG-0004HB-Kj for qemu-devel@nongnu.org; Sun, 16 Feb 2014 18:11:53 -0500 Received: from mout.gmx.net ([212.227.17.21]:59836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFAsG-0004Gs-B6 for qemu-devel@nongnu.org; Sun, 16 Feb 2014 18:11:48 -0500 Received: from [192.168.1.24] ([90.38.117.132]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LpwZn-1WuIVz2WTX-00fj2y for ; Mon, 17 Feb 2014 00:11:45 +0100 Message-ID: <53014600.9030309@caramail.com> Date: Mon, 17 Feb 2014 00:13:04 +0100 From: Olivier Danet MIME-Version: 1.0 References: <52C0B576.6060102@caramail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] Sun4m: Set HostID in NVRAM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Blue Swirl , Mark Cave-Ayland , Artyom Tarasenko Ping. Repost ! On 30/12/2013 15:02, Artyom Tarasenko wrote: > On Mon, Dec 30, 2013 at 12:51 AM, Olivier Danet 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 > 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 > >> --- >> 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 > >