Adding model for windows SPCR_TABLE
cr
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
+//
+// +build windows
// Package model provides model definition for startup processor
package model
+import (
+ "github.com/aws/amazon-ssm-agent/agent/util/interop"
+)
+
// Dcb structure
// http://pinvoke.net/default.aspx/Structures/DCB.html
type Dcb struct {
@@ -89,3 +95,46 @@ type EventLog struct {
type EventLogProperties struct {
Value interface{} `json:"Value"`
}
+
+// SPCR table defined.
+// See https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx
+//
+func get_struct_SPCR_TABLE() *interop.StructDef {
+ sd := interop.NewStructDef()
+ sd.AddField("Signature", 4)
+ sd.AddField("Length", 4)
+ sd.AddField("Revision", 1)
+ sd.AddField("Checksum", 1)
+ sd.AddField("OEMID", 6)
+ sd.AddField("OEMTableID", 8)
+ sd.AddField("OEMRevision", 4)
+ sd.AddField("CreatorID", 4)
+ sd.AddField("CreatorRevision", 4)
+ sd.AddField("InterfaceType", 1)
+ sd.AddField("Reserved1", 3)
+
+ sd.AddField("AddressSpace", 1)
+ sd.AddField("BitWidth", 1)
+ sd.AddField("BitOffset", 1)
+ sd.AddField("AccessSize", 1)
+ sd.AddField("Address", 8)
+
+ sd.AddField("InterruptType", 1)
+ sd.AddField("Irq", 1)
+ sd.AddField("GSI", 4)
+ sd.AddField("BaudRate", 1)
+ sd.AddField("Parity", 1)
+ sd.AddField("StopBits", 1)
+ sd.AddField("FlowControl", 1)
+ sd.AddField("TerminalType", 1)
+ sd.AddField("Reserved2", 1)
+ sd.AddField("PCIDeviceID", 2)
+ sd.AddField("PCIVendorID", 2)
+ sd.AddField("PCIBusNumber", 1)
+ sd.AddField("PCIDeviceNumber", 1)
+ sd.AddField("PCIFunctionNumber", 1)
+ sd.AddField("PCIFlags", 4)
+ sd.AddField("PCISegment", 1)
+ sd.AddField("Reserved3", 4)
+ return sd
+}
