mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
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>
This commit is contained in:
parent
6f6831f61a
commit
f9681f116c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user