* [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM
@ 2013-12-29 23:51 Olivier Danet
2013-12-30 14:02 ` Artyom Tarasenko
2014-02-20 8:46 ` [Qemu-devel] [PATCH] sparc: " Mark Cave-Ayland
0 siblings, 2 replies; 5+ messages in thread
From: Olivier Danet @ 2013-12-29 23:51 UTC (permalink / raw)
To: qemu-devel, 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 <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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM
2013-12-29 23:51 [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM Olivier Danet
@ 2013-12-30 14:02 ` Artyom Tarasenko
2014-02-16 23:13 ` [Qemu-devel] [PATCH] Sun4m: " Olivier Danet
2014-02-20 8:46 ` [Qemu-devel] [PATCH] sparc: " Mark Cave-Ayland
1 sibling, 1 reply; 5+ messages in thread
From: Artyom Tarasenko @ 2013-12-30 14:02 UTC (permalink / raw)
To: Olivier Danet; +Cc: Blue Swirl, Mark Cave-Ayland, qemu-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH] Sun4m: Set HostID in NVRAM
2013-12-30 14:02 ` Artyom Tarasenko
@ 2014-02-16 23:13 ` Olivier Danet
2014-02-23 17:32 ` Mark Cave-Ayland
0 siblings, 1 reply; 5+ messages in thread
From: Olivier Danet @ 2014-02-16 23:13 UTC (permalink / raw)
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 <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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM
2013-12-29 23:51 [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM Olivier Danet
2013-12-30 14:02 ` Artyom Tarasenko
@ 2014-02-20 8:46 ` Mark Cave-Ayland
1 sibling, 0 replies; 5+ messages in thread
From: Mark Cave-Ayland @ 2014-02-20 8:46 UTC (permalink / raw)
To: Olivier Danet; +Cc: qemu-devel, Artyom Tarasenko
On 29/12/13 23:51, 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 <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);
I think there is some whitespace damage on this patch? At least I
couldn't apply it as is :/ Also the lack of a space after the final
comma on the line above looks suspicious too... have you tried running
scripts/checkpatch.pl on the resulting diffs?
> +
> /* Calculate checksum */
> tmp = 0;
> tmpptr = (uint8_t *)header;
Apart from the whitespace issues, the basic patch looks fine though.
ATB,
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Sun4m: Set HostID in NVRAM
2014-02-16 23:13 ` [Qemu-devel] [PATCH] Sun4m: " Olivier Danet
@ 2014-02-23 17:32 ` Mark Cave-Ayland
0 siblings, 0 replies; 5+ messages in thread
From: Mark Cave-Ayland @ 2014-02-23 17:32 UTC (permalink / raw)
To: Olivier Danet; +Cc: Blue Swirl, qemu-devel, Artyom Tarasenko
On 16/02/14 23:13, Olivier Danet wrote:
> Ping.
> Repost !
>
> On 30/12/2013 15:02, Artyom Tarasenko wrote:
>> 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;
>>> --
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
I've applied this to my qemu-sparc branch.
ATB,
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-23 17:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-29 23:51 [Qemu-devel] [PATCH] sparc: Set HostID in NVRAM Olivier Danet
2013-12-30 14:02 ` 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
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).