diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2014-02-23 17:08:06 +0000 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2014-02-27 10:01:40 +0000 |
commit | f9681f116ce06612b12ef41d8637f6659255ec98 (patch) | |
tree | 782a06f3f725f0fafc36390d3cba968e648fae23 /include/hw/nvram | |
parent | 6f6831f61a44fde832ee6fab0cc5632de34cf6b7 (diff) | |
download | qemu-f9681f116ce06612b12ef41d8637f6659255ec98.zip qemu-f9681f116ce06612b12ef41d8637f6659255ec98.tar.gz qemu-f9681f116ce06612b12ef41d8637f6659255ec98.tar.bz2 |
sun4m: Set HostID in NVRAM
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>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include/hw/nvram')
-rw-r--r-- | include/hw/nvram/openbios_firmware_abi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/nvram/openbios_firmware_abi.h b/include/hw/nvram/openbios_firmware_abi.h index 5e6e5d4..c66ee22 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; |