First, thanks to everyone who has worked to get OpenBIOS up to its current functional level over the past couple of years. I'm using Solaris 9 on OpenBIOS with pretty good success these days, which is awesome.
I do have a question about Qemu, OpenBIOS, and the Solaris hostid. It seems that, currently, when booting Solaris with Qemu, the host ID is set to "80000000." As far as I can tell, this isn't near correct - according to all of the documentation I've read, the host ID should be calculated based on the machine type, and some portion of the MAC address. This may be the wrong forum in which to ask this, but I'm wondering if someone could shed light on why it shows up that way, and if there's a way in OpenBIOS via the PROM/NVRAM data to set the host ID to something a little bit closer to normal?
Thanks! -Nick
-------- This e-mail may contain SEAKR Engineering (SEAKR) Confidential and Proprietary Information. If this message is not intended for you, you are strictly prohibited from using this message, its contents or attachments in any way. If you have received this message in error, please delete the message from your mailbox. This e-mail may contain export-controlled material and should be handled accordingly.
On 2013-Dec-27, 14:10 , Nick Couchman wrote:
First, thanks to everyone who has worked to get OpenBIOS up to its current functional level over the past couple of years. I'm using Solaris 9 on OpenBIOS with pretty good success these days, which is awesome.
I do have a question about Qemu, OpenBIOS, and the Solaris hostid. It seems that, currently, when booting Solaris with Qemu, the host ID is set to "80000000." As far as I can tell, this isn't near correct - according to all of the documentation I've read, the host ID should be calculated based on the machine type, and some portion of the MAC address. This may be the wrong forum in which to ask this, but I'm wondering if someone could shed light on why it shows up that way, and if there's a way in OpenBIOS via the PROM/NVRAM data to set the host ID to something a little bit closer to normal?
The HOSTID used to have embedded knowledge about the system type and other details. As of (I recall) Sun4u, the hostid is 0x8000.0000 plus a serial number. Openbios should pick a number other than "0" for the serial number :-)
On 2013/12/27 at 12:42, Tarl Neustaedter tarl-b2@tarl.net wrote:
On 2013-Dec-27, 14:10 , Nick Couchman wrote:
First, thanks to everyone who has worked to get OpenBIOS up to its current
functional level over the past couple of years. I'm using Solaris 9 on OpenBIOS with pretty good success these days, which is awesome.
I do have a question about Qemu, OpenBIOS, and the Solaris hostid. It seems
that, currently, when booting Solaris with Qemu, the host ID is set to "80000000." As far as I can tell, this isn't near correct - according to all of the documentation I've read, the host ID should be calculated based on the machine type, and some portion of the MAC address. This may be the wrong forum in which to ask this, but I'm wondering if someone could shed light on why it shows up that way, and if there's a way in OpenBIOS via the PROM/NVRAM data to set the host ID to something a little bit closer to normal?
The HOSTID used to have embedded knowledge about the system type and other details. As of (I recall) Sun4u, the hostid is 0x8000.0000 plus a serial number. Openbios should pick a number other than "0" for the serial number :-)
Okay, is that something that can be changed via a prom (setenv) command? If not, is that something that could/should be added to OpenBIOS, or would that violate the spirit of getting OpenBIOS as close to OBP?
-------- This e-mail may contain SEAKR Engineering (SEAKR) Confidential and Proprietary Information. If this message is not intended for you, you are strictly prohibited from using this message, its contents or attachments in any way. If you have received this message in error, please delete the message from your mailbox. This e-mail may contain export-controlled material and should be handled accordingly.
On 2013-Dec-27, 16:16 , Nick Couchman wrote:
Okay, is that something that can be changed via a prom (setenv) command? If not, is that something that could/should be added to OpenBIOS, or would that violate the spirit of getting OpenBIOS as close to OBP?
The HostID and MAC address are part of the idprom on Sun Machines. That's a 32-byte static rom area on pre-sun4v machines, you can see it as a property with "prtconf -pv" from Solaris, or with .properties from "/" at the ok prompt.
It's not supposed to be changeable by the customer, it's supposed to be fixed at the factory so the serial number is meaningful.
On 2013/12/27 at 14:24, Tarl Neustaedter tarl-b2@tarl.net wrote:
On 2013-Dec-27, 16:16 , Nick Couchman wrote:
Okay, is that something that can be changed via a prom (setenv) command? If
not, is that something that could/should be added to OpenBIOS, or would that violate the spirit of getting OpenBIOS as close to OBP?
The HostID and MAC address are part of the idprom on Sun Machines. That's a 32-byte static rom area on pre-sun4v machines, you can see it as a property with "prtconf -pv" from Solaris, or with .properties from "/" at the ok prompt.
It's not supposed to be changeable by the customer, it's supposed to be fixed at the factory so the serial number is meaningful.
Understood, but a virtual environment is a little bit different, since the only serial number is going to be some sort of UUID that is generated either at VM start time or is generated and then maintained in a config file. MAC addresses can be customized for VMs, as well. Clearly 80000000 isn't a valid hostid, so what should OpenBIOS and/or Qemu be doing, here?
-------- This e-mail may contain SEAKR Engineering (SEAKR) Confidential and Proprietary Information. If this message is not intended for you, you are strictly prohibited from using this message, its contents or attachments in any way. If you have received this message in error, please delete the message from your mailbox. This e-mail may contain export-controlled material and should be handled accordingly.
On 2013-Dec-27, 18:53 , Nick Couchman wrote:
Understood, but a virtual environment is a little bit different, since the only serial number is going to be some sort of UUID that is generated either at VM start time or is generated and then maintained in a config file. MAC addresses can be customized for VMs, as well. Clearly 80000000 isn't a valid hostid, so what should OpenBIOS and/or Qemu be doing, here?
I'd suggest that instead of h# 8000.0000, you should use h# 8012.3456 - that's the value we use when debugging hardware which doesn't have the idprom set up. Supposedly, nothing actually looks at the serial number in the hostid, but it's that "supposedly" which worries me.
You might also check that the system mac address is getting set up correctly. I know there are unexpected places that it gets used (certain SCSI drivers, for example).
On 28/12/13 05:26, Tarl Neustaedter wrote:
On 2013-Dec-27, 18:53 , Nick Couchman wrote:
Understood, but a virtual environment is a little bit different, since the only serial number is going to be some sort of UUID that is generated either at VM start time or is generated and then maintained in a config file. MAC addresses can be customized for VMs, as well. Clearly 80000000 isn't a valid hostid, so what should OpenBIOS and/or Qemu be doing, here?
I'd suggest that instead of h# 8000.0000, you should use h# 8012.3456 - that's the value we use when debugging hardware which doesn't have the idprom set up. Supposedly, nothing actually looks at the serial number in the hostid, but it's that "supposedly" which worries me.
Okay that's something that's fairly easy to do. My main questions would be:
i) if nothing looks at hostid, then would it matter that it is all zeros?
ii) if we do set it to 8012.3456 then if something did happen to check hostid then would it detect this special magic number and start to behave differently? (e.g. kernels detecting prototype hardware)
You might also check that the system mac address is getting set up correctly. I know there are unexpected places that it gets used (certain SCSI drivers, for example).
Hmmm that's a good point actually. I don't believe that we currently set the MAC address property under /options.
ATB,
Mark.
On Sat, Dec 28, 2013 at 11:01 AM, Mark Cave-Ayland mark.cave-ayland@ilande.co.uk wrote:
On 28/12/13 05:26, Tarl Neustaedter wrote:
On 2013-Dec-27, 18:53 , Nick Couchman wrote:
Understood, but a virtual environment is a little bit different, since the only serial number is going to be some sort of UUID that is generated either at VM start time or is generated and then maintained in a config file. MAC addresses can be customized for VMs, as well. Clearly 80000000 isn't a valid hostid, so what should OpenBIOS and/or Qemu be doing, here?
I'd suggest that instead of h# 8000.0000, you should use h# 8012.3456 - that's the value we use when debugging hardware which doesn't have the idprom set up. Supposedly, nothing actually looks at the serial number in the hostid, but it's that "supposedly" which worries me.
Okay that's something that's fairly easy to do. My main questions would be:
i) if nothing looks at hostid, then would it matter that it is all zeros?
ii) if we do set it to 8012.3456 then if something did happen to check hostid then would it detect this special magic number and start to behave differently? (e.g. kernels detecting prototype hardware)
I'd suggest we fix it in QEMU, not in OpenBIOS. Some software may get unhappy when a hostid in firmware diverges from the one in NVRAM.
Artyom
You might also check that the system mac address is getting set up correctly. I know there are unexpected places that it gets used (certain SCSI drivers, for example).
Hmmm that's a good point actually. I don't believe that we currently set the MAC address property under /options.
ATB,
Mark.
Okay that's something that's fairly easy to do. My main questions would be:
i) if nothing looks at hostid, then would it matter that it is all zeros?
There are a few things that do - software licenses, for example. FlexLM/FlexNet, in particular, on Solaris, use the Host ID value and not the MAC address (which is used on almost every other platform).
-Nick
-------- This e-mail may contain SEAKR Engineering (SEAKR) Confidential and Proprietary Information. If this message is not intended for you, you are strictly prohibited from using this message, its contents or attachments in any way. If you have received this message in error, please delete the message from your mailbox. This e-mail may contain export-controlled material and should be handled accordingly.
On 27/12/2013 20:42, Tarl Neustaedter wrote:
On 2013-Dec-27, 14:10 , Nick Couchman wrote:
First, thanks to everyone who has worked to get OpenBIOS up to its current functional level over the past couple of years. I'm using Solaris 9 on OpenBIOS with pretty good success these days, which is awesome.
I do have a question about Qemu, OpenBIOS, and the Solaris hostid. It seems that, currently, when booting Solaris with Qemu, the host ID is set to "80000000." As far as I can tell, this isn't near correct
- according to all of the documentation I've read, the host ID should
be calculated based on the machine type, and some portion of the MAC address. This may be the wrong forum in which to ask this, but I'm wondering if someone could shed light on why it shows up that way, and if there's a way in OpenBIOS via the PROM/NVRAM data to set the host ID to something a little bit closer to normal?
The HOSTID used to have embedded knowledge about the system type and other details. As of (I recall) Sun4u, the hostid is 0x8000.0000 plus a serial number. Openbios should pick a number other than "0" for the serial number :-)
[On 32bits SparcStations] The Host ID is made of the machine type and the serial number. the serial number is identical to three bytes of the Ethernet MAC address, shown as decimal during boot. All that stuff is written into the NVRAM
For example, on a SparcStation 20 : MAC Address = 08:00:20:74:FB:DA Host ID = 7274FBDA (72 is the machine type of the SS20) Serial number = #7666650 = 0x74FBDA
(And the barcode on the NVRAM chip is also "74FBDA" )
On a SparcStation5, the machine type is 0x80, everything else is identical.
Maybe this small patch for QEMU could help : ------------------------------------------------------------------------ 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; ------------------------------------------------------------------------
Hi Oliver,
On Fri, Dec 27, 2013 at 10:56 PM, Olivier Danet odanet@caramail.com wrote:
On 27/12/2013 20:42, Tarl Neustaedter wrote:
On 2013-Dec-27, 14:10 , Nick Couchman wrote:
First, thanks to everyone who has worked to get OpenBIOS up to its current functional level over the past couple of years. I'm using Solaris 9 on OpenBIOS with pretty good success these days, which is awesome.
I do have a question about Qemu, OpenBIOS, and the Solaris hostid. It seems that, currently, when booting Solaris with Qemu, the host ID is set to "80000000." As far as I can tell, this isn't near correct - according to all of the documentation I've read, the host ID should be calculated based on the machine type, and some portion of the MAC address. This may be the wrong forum in which to ask this, but I'm wondering if someone could shed light on why it shows up that way, and if there's a way in OpenBIOS via the PROM/NVRAM data to set the host ID to something a little bit closer to normal?
The HOSTID used to have embedded knowledge about the system type and other details. As of (I recall) Sun4u, the hostid is 0x8000.0000 plus a serial number. Openbios should pick a number other than "0" for the serial number :-)
[On 32bits SparcStations] The Host ID is made of the machine type and the serial number. the serial number is identical to three bytes of the Ethernet MAC address, shown as decimal during boot. All that stuff is written into the NVRAM
For example, on a SparcStation 20 : MAC Address = 08:00:20:74:FB:DA Host ID = 7274FBDA (72 is the machine type of the SS20) Serial number = #7666650 = 0x74FBDA
(And the barcode on the NVRAM chip is also "74FBDA" )
On a SparcStation5, the machine type is 0x80, everything else is identical.
Maybe this small patch for QEMU could help :
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;
Can you please submit this patch (+ SoB) to the qemu-devel mailing list? It's short and beautiful.
Artyom