iPXE allows access to general SMBIOS settings using the syntax: smbios/<type>.<offset>.<length> This provides access to any fixed-offset field within an SMBIOS structure. This syntax is currently overloaded to interpret a zero <length> as meaning that the byte at <offset> contains a string index; this provides access to SMBIOS strings (which are not located at fixed offsets). The "OEM Strings" SMBIOS structure contains strings which are not referenced by any fixed string index field within the structure. iPXE currently provides no way to access these strings. Fix by overloading the syntax for numerical SMBIOS settings to interpret an <offset> of zero as implying that <length> contains a literal string index. The OEM Strings can then be accessed using: smbios/11.0.1 smbios/11.0.2 smbios/11.0.3 ... The actual byte at offset zero will always contain the structure type, which is already known since it must be specified in order to access the structure. There is thus no plausible existing use case for an offset of zero; overloading the syntax in this way should therefore not break compatibility with any existing scripts. The corner case where both <offset> and <length> are zero is undefined (and, for now, will simply return a "not found" error). Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
99 |
|
99 |
|
100 |
|
100 |
|
101 |
|
101 |
|
|
102 |
|
|
102 |
|
103 |
|
103 |
|
104 |
|
104 |
|
105 |
|
105 |
|
106 |
|
106 |
|
107 |
|
107 |
|
108 |
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
112 |
|
118 |
|
113 |
|
119 |
|
114 |
|
120 |
|