summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Dxe/Nt32Platform
diff options
context:
space:
mode:
Diffstat (limited to 'EdkNt32Pkg/Dxe/Nt32Platform')
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturer.unibin0 -> 2896 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturerData.c57
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosLanguageData.c45
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendor.unibin0 -> 2260 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendorData.c88
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBootInformationData.c33
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturer.unibin0 -> 2460 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturerData.c45
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscDevicePath.h175
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscNumberOfInstallableLanguagesData.c37
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemString.unibin0 -> 1996 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemStringData.c32
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDevice.unibin0 -> 2042 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceData.c36
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceFunction.c164
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignator.unibin0 -> 9426 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorData.c99
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorFunction.c266
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscResetCapabilitiesData.c42
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.dxs27
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.h104
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.mbd45
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.msa114
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.unibin0 -> 2846 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverDataTable.c103
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverEntryPoint.c518
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageString.unibin0 -> 2014 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageStringData.c33
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturer.unibin0 -> 2456 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerData.c55
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerFunction.c122
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionString.unibin0 -> 2004 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionStringData.c32
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignation.unibin0 -> 2030 bytes
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignationData.c52
-rw-r--r--EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/build.xml47
36 files changed, 2371 insertions, 0 deletions
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturer.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturer.uni
new file mode 100644
index 0000000000..14a68936ef
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturer.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturerData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturerData.c
new file mode 100644
index 0000000000..9536c88aa4
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBaseBoardManufacturerData.c
@@ -0,0 +1,57 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscBaseBoardManufacturerData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_BASE_BOARD_MANUFACTURER_DATA, MiscBaseBoardManufacturer) = {
+ STRING_TOKEN(STR_MISC_BASE_BOARD_MANUFACTURER),
+ STRING_TOKEN(STR_MISC_BASE_BOARD_PRODUCT_NAME),
+ STRING_TOKEN(STR_MISC_BASE_BOARD_VERSION),
+ STRING_TOKEN(STR_MISC_BASE_BOARD_SERIAL_NUMBER),
+ STRING_TOKEN(STR_MISC_BASE_BOARD_ASSET_TAG),
+ STRING_TOKEN(STR_MISC_BASE_BOARD_CHASSIS_LOCATION),
+ { // BaseBoardFeatureFlags
+ 1, // Motherboard
+ 0, // RequiresDaughterCard
+ 0, // Removable
+ 1, // Replaceable,
+ 0, // HotSwappable
+ 0, // Reserved
+ },
+ EfiBaseBoardTypeUnknown, // BaseBoardType
+ { // BaseBoardChassisLink
+ EFI_MISC_SUBCLASS_GUID, // ProducerName
+ 1, // Instance
+ 1, // SubInstance
+ },
+ 0, // BaseBoardNumberLinks
+ { // LinkN
+ EFI_MISC_SUBCLASS_GUID, // ProducerName
+ 1, // Instance
+ 1, // SubInstance
+ },
+};
+
+/* eof - MiscBaseBoardManufacturerData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosLanguageData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosLanguageData.c
new file mode 100644
index 0000000000..652acacb54
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosLanguageData.c
@@ -0,0 +1,45 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscBiosLanguageData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_DATA, NumberOfInstallableLangauges) = {
+ 1, // NumberOfInstallableLanguages
+ { // LanguageFlags
+ 0, // AbbreviatedLanguageFormat
+ 0 // Reserved
+ },
+ 0 // CurrentLanguageNumber
+};
+
+//
+//
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_SYSTEM_LANGUAGE_STRING_DATA, SystemLanguageString) = {
+ 0, // LanguageId
+ STR_MISC_SYSTEM_LANGUAGE_STRING // SystemLanguageString
+};
+
+/* eof - MiscBiosLanguageData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendor.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendor.uni
new file mode 100644
index 0000000000..b1e7e520fc
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendor.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendorData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendorData.c
new file mode 100644
index 0000000000..3187aba2a0
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBiosVendorData.c
@@ -0,0 +1,88 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscBiosVendorData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_BIOS_VENDOR_DATA, MiscBiosVendor) = {
+ STRING_TOKEN(STR_MISC_BIOS_VENDOR), // BiosVendor
+ STRING_TOKEN(STR_MISC_BIOS_VERSION), // BiosVersion
+ STRING_TOKEN(STR_MISC_BIOS_RELEASE_DATE), // BiosReleaseDate
+ 0xBABE, // BiosStartingAddress
+ { // BiosPhysicalDeviceSize
+ 2, // Value
+ 3, // Exponent
+ },
+ { // BiosCharacteristics1
+ 0, // Reserved1 :2
+ 0, // Unknown :1
+ 1, // BiosCharacteristicsNotSupported :1
+ 0, // IsaIsSupported :1
+ 0, // McaIsSupported :1
+ 0, // EisaIsSupported :1
+ 0, // PciIsSupported :1
+ 0, // PcmciaIsSupported :1
+ 0, // PlugAndPlayIsSupported :1
+ 0, // ApmIsSupported :1
+ 0, // BiosIsUpgradable :1
+ 0, // BiosShadowingAllowed :1
+ 0, // VlVesaIsSupported :1
+ 0, // EscdSupportIsAvailable :1
+ 0, // BootFromCdIsSupported :1
+ 0, // SelectableBootIsSupported :1
+ 0, // RomBiosIsSocketed :1
+ 0, // BootFromPcmciaIsSupported :1
+ 0, // EDDSpecificationIsSupported :1
+ 0, // JapaneseNecFloppyIsSupported :1
+ 0, // JapaneseToshibaFloppyIsSupported :1
+ 0, // Floppy525_360IsSupported :1
+ 0, // Floppy525_12IsSupported :1
+ 0, // Floppy35_720IsSupported :1
+ 0, // Floppy35_288IsSupported :1
+ 0, // PrintScreenIsSupported :1
+ 0, // Keyboard8042IsSupported :1
+ 0, // SerialIsSupported :1
+ 0, // PrinterIsSupported :1
+ 0, // CgaMonoIsSupported :1
+ 0, // NecPc98 :1
+ 0, // AcpiIsSupported :1
+ 0, // UsbLegacyIsSupported :1
+ 0, // AgpIsSupported :1
+ 0, // I20BootIsSupported :1
+ 0, // Ls120BootIsSupported :1
+ 0, // AtapiZipDriveBootIsSupported :1
+ 0, // Boot1394IsSupported :1
+ 0, // SmartBatteryIsSupported :1
+ 0, // BiosBootSpecIsSupported :1
+ 0, // FunctionKeyNetworkBootIsSupported :1
+ 0 // Reserved :22
+ },
+ { // BiosCharacteristics2
+ 0, // BiosReserved :16
+ 0, // SystemReserved :16
+ 0 // Reserved :32
+ },
+};
+
+/* eof - MiscBiosVendorData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBootInformationData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBootInformationData.c
new file mode 100644
index 0000000000..1bf280b141
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscBootInformationData.c
@@ -0,0 +1,33 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscBootInformationData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_BOOT_INFORMATION_STATUS_DATA, BootInformationStatus) = {
+ EfiBootInformationStatusNoError, // BootInformationStatus
+ 0 // BootInformationData
+};
+
+/* eof - MiscBootInformationData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturer.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturer.uni
new file mode 100644
index 0000000000..67bee85037
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturer.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturerData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturerData.c
new file mode 100644
index 0000000000..5c657eef15
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscChassisManufacturerData.c
@@ -0,0 +1,45 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscChassisManufacturerData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Chassis Manufacturer data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_CHASSIS_MANUFACTURER_DATA, MiscChassisManufacturer) = {
+ STRING_TOKEN(STR_MISC_CHASSIS_MANUFACTURER), // ChassisManufactrurer
+ STRING_TOKEN(STR_MISC_CHASSIS_VERSION), // ChassisVersion
+ STRING_TOKEN(STR_MISC_CHASSIS_SERIAL_NUMBER), // ChassisSerialNumber
+ STRING_TOKEN(STR_MISC_CHASSIS_ASSET_TAG), // ChassisAssetTag
+ { // ChassisTypeStatus
+ EfiMiscChassisTypeOther, // ChassisType
+ 0, // ChassisLockPresent
+ 0 // Reserved
+ },
+ EfiChassisStateOther, // ChassisBootupState
+ EfiChassisStateOther, // ChassisPowerSupplyState
+ EfiChassisStateOther, // ChassisThermalState
+ EfiChassisSecurityStatusOther, // ChassisSecurityState
+ 0 // ChassisOemDefined
+};
+
+/* eof - MiscChassisManufacaturerData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscDevicePath.h b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscDevicePath.h
new file mode 100644
index 0000000000..1568e27b32
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscDevicePath.h
@@ -0,0 +1,175 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscDevicePath.h
+
+Abstract:
+
+ Misc class required EFI Device Path definitions (Ports, slots &
+ onboard devices)
+
+--*/
+
+#ifndef _MISC_DEVICE_PATH_H
+#define _MISC_DEVICE_PATH_H
+
+
+#pragma pack(1)
+//
+// USB
+//
+
+/* For reference:
+#define USB1_1_STR "ACPI(PNP0A03,0)/PCI(1D,0)."
+#define USB1_2_STR "ACPI(PNP0A03,0)/PCI(1D,1)."
+#define USB1_3_STR "ACPI(PNP0A03,0)/PCI(1D,2)."
+#define USB2_1_STR "ACPI(PNP0A03,0)/PCI(1D,7)."
+*/
+
+//
+// #define acpi { 0x02, 0x01, 0x00, 0x0C, 0x0a0341d0, 0x00000000 }
+// #define pci( device,function) { 0x01, 0x01, 0x00, 0x06, device, function }
+// #define end { 0xFF, 0xFF, 0x00, 0x04 }
+//
+#define ACPI \
+ { \
+ ACPI_DEVICE_PATH, ACPI_DP, (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), (UINT8) \
+ ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8), EISA_PNP_ID (0x0A03), 0 \
+ }
+#define PCI(device, function) \
+ { \
+ HARDWARE_DEVICE_PATH, HW_PCI_DP, (UINT8) (sizeof (PCI_DEVICE_PATH)), (UINT8) \
+ ((sizeof (PCI_DEVICE_PATH)) >> 8), function, device \
+ }
+#define END \
+ { \
+ END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, END_DEVICE_PATH_LENGTH, 0 \
+ }
+
+#define LPC(eisaid, function) \
+ { \
+ ACPI_DEVICE_PATH, ACPI_DP, (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), (UINT8) \
+ ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8), EISA_PNP_ID (eisaid), function \
+ }
+
+//
+// Shanmu >> moved to TianoDevicePath.h
+//
+
+/*
+typedef struct _USB_PORT_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH PciBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} USB_PORT_DEVICE_PATH;
+
+
+//IDE ??I am not sure. Should this be ATAPI_DEVICE_PATH
+typedef struct _IDE_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH PciBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} IDE_DEVICE_PATH;
+
+//RMC Connector
+typedef struct _RMC_CONN_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH PciBridgeDevicePath;
+ PCI_DEVICE_PATH PciBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} RMC_CONN_DEVICE_PATH;
+
+//static RMC_CONN_DEVICE_PATH mRmcConnDevicePath = { acpi, pci( 0x1E,0x00 ),pci( 0x0A,0x00 ), end };
+
+//RIDE
+typedef struct _RIDE_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH PciBridgeDevicePath;
+ PCI_DEVICE_PATH PciBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} RIDE_DEVICE_PATH;
+
+//static RIDE_DEVICE_PATH mRideDevicePath = { acpi, pci( 0x1E,0x00 ),pci( 0x02,0x00 ), end };
+
+//Gigabit NIC
+//typedef struct _GB_NIC_DEVICE_PATH
+//{
+// ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+// PCI_DEVICE_PATH PciBridgeDevicePath;
+// PCI_DEVICE_PATH PciXBridgeDevicePath;
+// PCI_DEVICE_PATH PciXBusDevicePath;
+// EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+//} GB_NIC_DEVICE_PATH;
+
+//static GB_NIC_DEVICE_PATH mGbNicDevicePath = { acpi, pci( 0x03,0x00 ),pci( 0x1F,0x00 ),pci( 0x07,0x00 ), end };
+
+
+//P/S2 Connector
+typedef struct _PS2_CONN_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH LpcBridgeDevicePath;
+ ACPI_HID_DEVICE_PATH LpcBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} PS2_CONN_DEVICE_PATH;
+
+//static PS2_CONN_DEVICE_PATH mPs2KeyboardDevicePath = { acpi, pci( 0x1F,0x00 ),lpc( 0x0303,0 ), end };
+//static PS2_CONN_DEVICE_PATH mPs2MouseDevicePath = { acpi, pci( 0x1F,0x00 ),lpc( 0x0303,1 ), end };
+
+//Serial Port Connector
+typedef struct _SERIAL_CONN_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH LpcBridgeDevicePath;
+ ACPI_HID_DEVICE_PATH LpcBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} SERIAL_CONN_DEVICE_PATH;
+
+//static SERIAL_CONN_DEVICE_PATH mCom1DevicePath = { acpi, pci( 0x1F,0x00 ),lpc( 0x0501,0 ), end };
+//static SERIAL_CONN_DEVICE_PATH mCom2DevicePath = { acpi, pci( 0x1F,0x00 ),lpc( 0x0501,1 ), end };
+
+//Parallel Port Connector
+typedef struct _PARALLEL_CONN_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH LpcBridgeDevicePath;
+ ACPI_HID_DEVICE_PATH LpcBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} PARALLEL_CONN_DEVICE_PATH;
+
+//static PARALLEL_CONN_DEVICE_PATH mLpt1DevicePath = { acpi, pci( 0x1F,0x00 ),lpc( 0x0401,0 ), end };
+
+//Floopy Connector
+typedef struct _FLOOPY_CONN_DEVICE_PATH
+{
+ ACPI_HID_DEVICE_PATH PciRootBridgeDevicePath;
+ PCI_DEVICE_PATH LpcBridgeDevicePath;
+ ACPI_HID_DEVICE_PATH LpcBusDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} FLOOPY_CONN_DEVICE_PATH;
+
+//static FLOOPY_CONN_DEVICE_PATH mFloopyADevicePath = { acpi, pci( 0x1F,0x00 ),lpc( 0x0604,0 ), end };
+//static FLOOPY_CONN_DEVICE_PATH mFloopyBDevicePath = { acpi, pci( 0x1F,0x00 ),lpc( 0x0604,1 ), end };
+
+*/
+
+//
+// End Shanmu
+//
+#pragma pack()
+
+#endif
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscNumberOfInstallableLanguagesData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscNumberOfInstallableLanguagesData.c
new file mode 100644
index 0000000000..008425987b
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscNumberOfInstallableLanguagesData.c
@@ -0,0 +1,37 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscNumberOfInstallableLanguagesData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_NUMBER_OF_INSTALLABLE_LANGUAGES_DATA, NumberOfInstallableLanguages) = {
+ 1, // NumberOfInstallableLanguages
+ { // LanguageFlags
+ 0, // AbbreviatedLanguageFormat
+ 0 // Reserved
+ },
+ 0, // CurrentLanguageNumber
+};
+
+/* eof - MiscNumberOfInstallableLanguagesData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemString.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemString.uni
new file mode 100644
index 0000000000..fb79bdbde1
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemString.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemStringData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemStringData.c
new file mode 100644
index 0000000000..fdfbd1f2e1
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOemStringData.c
@@ -0,0 +1,32 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscOemStringData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_OEM_STRING_DATA, OemString) = {
+ STRING_TOKEN(STR_MISC_OEM_STRING)
+};
+
+/* eof - MiscOemStringData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDevice.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDevice.uni
new file mode 100644
index 0000000000..b24529b804
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDevice.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceData.c
new file mode 100644
index 0000000000..e7fa04a29b
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceData.c
@@ -0,0 +1,36 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscOnboardDeviceData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_ONBOARD_DEVICE_DATA, MiscOnboardDevice) = {
+ STRING_TOKEN(STR_MISC_ONBOARD_DEVICE_DESCRIPTION), // OnBoardDeviceDescription
+ { // OnBoardDeviceStatus
+ EfiOnBoardDeviceTypeOther, // DeviceType
+ 0, // DeviceEnabled
+ 0 // Reserved
+ },
+ 0 // OnBoardDevicePath
+};
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceFunction.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceFunction.c
new file mode 100644
index 0000000000..d96b6cc2ad
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscOnboardDeviceFunction.c
@@ -0,0 +1,164 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscOnboardDeviceFunction.c
+
+Abstract:
+
+ Onboard device information boot time changes.
+ Misc. subclass type 8.
+ SMBIOS type 10.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+#include "winntio/winntio.h"
+#include "winntthunk/winntthunk.h"
+
+#pragma pack(1)
+
+typedef struct _VENDOR_DEVICE {
+ EFI_DEVICE_PATH_PROTOCOL Platform;
+ EFI_GUID PlatformGuid;
+ EFI_DEVICE_PATH_PROTOCOL Device;
+ EFI_GUID DeviceGuid;
+ UINT8 DeviceData[4];
+ EFI_DEVICE_PATH_PROTOCOL End;
+
+} VENDOR_DEVICE;
+#pragma pack()
+
+MISC_SUBCLASS_TABLE_FUNCTION (
+ MiscOnboardDeviceVideo
+ )
+/*++
+Description:
+
+ This function makes boot time changes to the contents of the
+ MiscOnboardDevice structure.
+
+Parameters:
+
+ RecordType
+ Type of record to be processed from the Data Table.
+ mMiscSubclassDataTable[].RecordType
+
+ RecordLen
+ Size of static RecordData from the Data Table.
+ mMiscSubclassDataTable[].RecordLen
+
+ RecordData
+ Pointer to copy of RecordData from the Data Table. Changes made
+ to this copy will be written to the Data Hub but will not alter
+ the contents of the static Data Table.
+
+ LogRecordData
+ Set *LogRecordData to TRUE to log RecordData to Data Hub.
+ Set *LogRecordData to FALSE when there is no more data to log.
+
+Returns:
+
+ EFI_SUCCESS
+ All parameters were valid and *RecordData and *LogRecordData have
+ been set.
+
+ EFI_UNSUPPORTED
+ Unexpected RecordType value.
+
+ EFI_INVALID_PARAMETER
+ One of the following parameter conditions was true:
+ RecordLen was zero.
+ RecordData was NULL.
+ LogRecordData was NULL.
+--*/
+{
+ STATIC VENDOR_DEVICE mVideoDevicePath = {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ 0x14
+ },
+ EFI_WIN_NT_THUNK_PROTOCOL_GUID,
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ 0x18
+ },
+ EFI_WIN_NT_UGA_GUID,
+ 0,
+ 0,
+ 0,
+ 0,
+ END
+ };
+
+ STATIC BOOLEAN Done = FALSE;
+
+ //
+ // First check for invalid parameters.
+ //
+ if (RecordLen == 0 || RecordData == NULL || LogRecordData == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+ //
+ // Then check for unsupported RecordType.
+ //
+ if (RecordType != EFI_MISC_ONBOARD_DEVICE_DATA_RECORD_NUMBER) {
+ return EFI_UNSUPPORTED;
+ }
+ //
+ // Is this the first time through this function?
+ //
+ if (!Done) {
+ //
+ // Yes, this is the first time. Inspect/Change the contents of the
+ // RecordData structure.
+ //
+ //
+ // Any time changes?
+ //
+ // %%TBD
+ //
+ // Set Done flag to TRUE for next pass through this function.
+ // Set *LogRecordData to TRUE so data will get logged to Data Hub.
+ //
+ switch (((EFI_MISC_ONBOARD_DEVICE_DATA *) RecordData)->OnBoardDeviceDescription) {
+ case STR_MISC_ONBOARD_DEVICE_VIDEO_DESCRIPTION:
+ {
+ CopyMem (
+ &((EFI_MISC_ONBOARD_DEVICE_DATA *) RecordData)->OnBoardDevicePath,
+ &mVideoDevicePath,
+ GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mVideoDevicePath)
+ );
+ *RecordLen = *RecordLen - sizeof (EFI_DEVICE_PATH_PROTOCOL) + GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mVideoDevicePath);
+ }
+ break;
+ }
+
+ Done = TRUE;
+ *LogRecordData = TRUE;
+ } else {
+ //
+ // No, this is the second time. Reset the state of the Done flag
+ // to FALSE and tell the data logger that there is no more data
+ // to be logged for this record type. If any memory allocations
+ // were made by earlier passes, they must be released now.
+ //
+ Done = FALSE;
+ *LogRecordData = FALSE;
+ }
+
+ return EFI_SUCCESS;
+}
+
+/* eof - MiscOnboardDeviceFunction.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignator.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignator.uni
new file mode 100644
index 0000000000..b6a617b75e
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignator.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorData.c
new file mode 100644
index 0000000000..d886a9d8c4
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorData.c
@@ -0,0 +1,99 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscPortInternalConnectorDesignatorData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA, MiscPortInternalConnectorDesignator) = {
+ STRING_TOKEN(STR_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR), // PortInternalConnectorDesignator
+ STRING_TOKEN(STR_MISC_PORT_EXTERNAL_CONNECTOR_DESIGNATOR), // PortExternalConnectorDesignator
+ EfiPortConnectorTypeOther, // PortInternalConnectorType
+ EfiPortConnectorTypeOther, // PortExternalConnectorType
+ EfiPortTypeNone, // PortType
+ 0 // PortPath
+};
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA, MiscPortKeyboard) = {
+ STRING_TOKEN (STR_MISC_PORT_INTERNAL_KEYBOARD), // PortInternalConnectorDesignator
+ STRING_TOKEN (STR_MISC_PORT_EXTERNAL_KEYBOARD), // PortExternalConnectorDesignator
+ EfiPortConnectorTypeNone, // PortInternalConnectorType
+ EfiPortConnectorTypePS2, // PortExternalConnectorType
+ EfiPortTypeKeyboard, // PortType
+ // mPs2KbyboardDevicePath // PortPath
+ //
+ 0
+};
+
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA, MiscPortMouse) = {
+ STRING_TOKEN (STR_MISC_PORT_INTERNAL_MOUSE), // PortInternalConnectorDesignator
+ STRING_TOKEN (STR_MISC_PORT_EXTERNAL_MOUSE), // PortExternalConnectorDesignator
+ EfiPortConnectorTypeNone, // PortInternalConnectorType
+ EfiPortConnectorTypePS2, // PortExternalConnectorType
+ EfiPortTypeMouse, // PortType
+ // mPs2MouseDevicePath // PortPath
+ //
+ 0
+};
+
+
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA, MiscPortCom1) = {
+ STRING_TOKEN(STR_MISC_PORT_INTERNAL_COM1),
+ STRING_TOKEN(STR_MISC_PORT_EXTERNAL_COM1),
+ EfiPortConnectorTypeNone,
+ EfiPortConnectorTypeDB9Female,
+ EfiPortTypeSerial16550ACompatible,
+ 0
+};
+
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA, MiscPortCom2) = {
+ STRING_TOKEN(STR_MISC_PORT_INTERNAL_COM2),
+ STRING_TOKEN(STR_MISC_PORT_EXTERNAL_COM2),
+ EfiPortConnectorTypeNone,
+ EfiPortConnectorTypeDB9Female,
+ EfiPortTypeSerial16550ACompatible,
+ 0
+};
+
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA, MiscPortExtensionPower) = {
+ STRING_TOKEN(STR_MISC_PORT_INTERNAL_EXTENSION_POWER),
+ STRING_TOKEN(STR_MISC_PORT_EXTERNAL_EXTENSION_POWER),
+ EfiPortConnectorTypeOther,
+ EfiPortConnectorTypeNone,
+ EfiPortTypeOther,
+ 0
+};
+
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA, MiscPortFloppy) = {
+ STRING_TOKEN(STR_MISC_PORT_INTERNAL_FLOPPY),
+ STRING_TOKEN(STR_MISC_PORT_EXTERNAL_FLOPPY),
+ EfiPortConnectorTypeOnboardFloppy,
+ EfiPortConnectorTypeNone,
+ EfiPortTypeOther,
+ 0
+};
+
+/* eof - MiscPortInternalConnectorDesignatorData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorFunction.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorFunction.c
new file mode 100644
index 0000000000..a57c18c69b
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscPortInternalConnectorDesignatorFunction.c
@@ -0,0 +1,266 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscPortInternalConnectorDesignatorFunction.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+//
+//
+MISC_SUBCLASS_TABLE_FUNCTION (
+ MiscPortInternalConnectorDesignator
+ )
+/*++
+Description:
+
+ This function makes boot time changes to the contents of the
+ MiscPortConnectorInformation (Type 8).
+
+Parameters:
+
+ RecordType
+ Type of record to be processed from the Data Table.
+ mMiscSubclassDataTable[].RecordType
+
+ RecordLen
+ Size of static RecordData from the Data Table.
+ mMiscSubclassDataTable[].RecordLen
+
+ RecordData
+ Pointer to copy of RecordData from the Data Table. Changes made
+ to this copy will be written to the Data Hub but will not alter
+ the contents of the static Data Table.
+
+ LogRecordData
+ Set *LogRecordData to TRUE to log RecordData to Data Hub.
+ Set *LogRecordData to FALSE when there is no more data to log.
+
+Returns:
+
+ EFI_SUCCESS
+ All parameters were valid and *RecordData and *LogRecordData have
+ been set.
+
+ EFI_UNSUPPORTED
+ Unexpected RecordType value.
+
+ EFI_INVALID_PARAMETER
+ One of the following parameter conditions was true:
+ RecordLen was zero.
+ RecordData was NULL.
+ LogRecordData was NULL.
+--*/
+{
+ STATIC BOOLEAN Done = FALSE;
+ STATIC PS2_CONN_DEVICE_PATH mPs2KeyboardDevicePath = { ACPI, PCI (0x1F, 0x00), LPC (0x0303, 0), END };
+ STATIC PS2_CONN_DEVICE_PATH mPs2MouseDevicePath = { ACPI, PCI (0x1F, 0x00), LPC (0x0303, 1), END };
+ STATIC SERIAL_CONN_DEVICE_PATH mCom1DevicePath = { ACPI, PCI (0x1F, 0x00), LPC (0x0501, 0), END };
+ STATIC SERIAL_CONN_DEVICE_PATH mCom2DevicePath = { ACPI, PCI (0x1F, 0x00), LPC (0x0501, 1), END };
+ STATIC PARALLEL_CONN_DEVICE_PATH mLpt1DevicePath = { ACPI, PCI (0x1F, 0x00), LPC (0x0401, 0), END };
+ STATIC FLOOPY_CONN_DEVICE_PATH mFloopyADevicePath = { ACPI, PCI (0x1F, 0x00), LPC (0x0604, 0), END };
+ STATIC FLOOPY_CONN_DEVICE_PATH mFloopyBDevicePath = { ACPI, PCI (0x1F, 0x00), LPC (0x0604, 1), END };
+ STATIC USB_PORT_DEVICE_PATH mUsb0DevicePath = { ACPI, PCI (0x1d, 0x00), END };
+ STATIC USB_PORT_DEVICE_PATH mUsb1DevicePath = { ACPI, PCI (0x1d, 0x01), END };
+ STATIC USB_PORT_DEVICE_PATH mUsb2DevicePath = { ACPI, PCI (0x1d, 0x02), END };
+ STATIC USB_PORT_DEVICE_PATH mUsb3DevicePath = { ACPI, PCI (0x1d, 0x07), END };
+ STATIC IDE_DEVICE_PATH mIdeDevicePath = { ACPI, PCI (0x1F, 0x01), END };
+ STATIC GB_NIC_DEVICE_PATH mGbNicDevicePath = { ACPI, PCI( 0x03,0x00 ),PCI( 0x1F,0x00 ),PCI( 0x07,0x00 ), END };
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath = END;
+
+ //
+ // First check for invalid parameters.
+ //
+ // Shanmu >> to fix the Device Path Issue...
+ // if (RecordLen == 0 || RecordData == NULL || LogRecordData == NULL) {
+ //
+ if (*RecordLen == 0 || RecordData == NULL || LogRecordData == NULL) {
+ //
+ // End Shanmu
+ //
+ return EFI_INVALID_PARAMETER;
+ }
+ //
+ // Then check for unsupported RecordType.
+ //
+ if (RecordType != EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_RECORD_NUMBER) {
+ return EFI_UNSUPPORTED;
+ }
+ //
+ // Is this the first time through this function?
+ //
+ if (!Done) {
+ //
+ // Yes, this is the first time. Inspect/Change the contents of the
+ // RecordData structure.
+ //
+ //
+ // Device path is only updated here as it was not taking that in static data
+ //
+ // Shanmu >> to fix the Device Path Issue...
+ //
+
+ /*
+ switch (((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortInternalConnectorDesignator)
+ {
+ case STR_MISC_PORT_INTERNAL_MOUSE:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mPs2MouseDevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_KEYBOARD:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mPs2KeyboardDevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_COM1:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mCom1DevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_COM2:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mCom2DevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_LPT1:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mLpt1DevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_USB1:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mUsb0DevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_USB2:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mUsb1DevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_USB3:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mUsb2DevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_NETWORK:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mGbNicDevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_FLOPPY:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mFloopyADevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_IDE1:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mIdeDevicePath);
+ }break;
+ case STR_MISC_PORT_INTERNAL_IDE2:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = *((EFI_DEVICE_PATH_PROTOCOL*)&mIdeDevicePath);
+ }break;
+ default:
+ {
+ (EFI_DEVICE_PATH_PROTOCOL)((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *)RecordData)->PortPath = EndDevicePath;
+ }break;
+ }
+ */
+ switch (((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) RecordData)->PortInternalConnectorDesignator) {
+ case STR_MISC_PORT_INTERNAL_MOUSE:
+ {
+ CopyMem (
+ &((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) RecordData)->PortPath,
+ &mPs2MouseDevicePath,
+ GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mPs2MouseDevicePath)
+ );
+ *RecordLen = *RecordLen - sizeof (EFI_MISC_PORT_DEVICE_PATH) + GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mPs2MouseDevicePath);
+ }
+ break;
+
+ case STR_MISC_PORT_INTERNAL_KEYBOARD:
+ {
+ CopyMem (
+ &((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) RecordData)->PortPath,
+ &mPs2KeyboardDevicePath,
+ GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mPs2KeyboardDevicePath)
+ );
+ *RecordLen = *RecordLen - sizeof (EFI_MISC_PORT_DEVICE_PATH) + GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mPs2KeyboardDevicePath);
+ }
+ break;
+
+ case STR_MISC_PORT_INTERNAL_COM1:
+ {
+ CopyMem (
+ &((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) RecordData)->PortPath,
+ &mCom1DevicePath,
+ GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mCom1DevicePath)
+ );
+ *RecordLen = *RecordLen - sizeof (EFI_MISC_PORT_DEVICE_PATH) + GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mCom1DevicePath);
+ }
+ break;
+
+ case STR_MISC_PORT_INTERNAL_COM2:
+ {
+ CopyMem (
+ &((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) RecordData)->PortPath,
+ &mCom2DevicePath,
+ GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mCom2DevicePath)
+ );
+ *RecordLen = *RecordLen - sizeof (EFI_MISC_PORT_DEVICE_PATH) + GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mCom2DevicePath);
+ }
+ break;
+
+ case STR_MISC_PORT_INTERNAL_FLOPPY:
+ {
+ CopyMem (
+ &((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) RecordData)->PortPath,
+ &mFloopyADevicePath,
+ GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mFloopyADevicePath)
+ );
+ *RecordLen = *RecordLen - sizeof (EFI_MISC_PORT_DEVICE_PATH) + GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &mFloopyADevicePath);
+ }
+ break;
+
+ default:
+ {
+ CopyMem (
+ &((EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) RecordData)->PortPath,
+ &EndDevicePath,
+ GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &EndDevicePath)
+ );
+ *RecordLen = *RecordLen - sizeof (EFI_MISC_PORT_DEVICE_PATH) + GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) &EndDevicePath);
+ }
+ break;
+ }
+ //
+ // End Shanmu
+ //
+ // Set Done flag to TRUE for next pass through this function.
+ // Set *LogRecordData to TRUE so data will get logged to Data Hub.
+ //
+ Done = TRUE;
+ *LogRecordData = TRUE;
+ } else {
+ //
+ // No, this is the second time. Reset the state of the Done flag
+ // to FALSE and tell the data logger that there is no more data
+ // to be logged for this record type. If any memory allocations
+ // were made by earlier passes, they must be released now.
+ //
+ Done = FALSE;
+ *LogRecordData = FALSE;
+ }
+
+ return EFI_SUCCESS;
+}
+
+/* eof - MiscSystemManufacturerFunction.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscResetCapabilitiesData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscResetCapabilitiesData.c
new file mode 100644
index 0000000000..6e0c1bb5ad
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscResetCapabilitiesData.c
@@ -0,0 +1,42 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscResetCapabilitiesData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_RESET_CAPABILITIES, MiscResetCapabilities) = {
+ { // ResetCapabilities
+ 0, // Status
+ 0, // BootOption
+ 0, // BootOptionOnLimit
+ 0, // WatchdogTimerPresent
+ 0 // Reserved
+ },
+ 0, // ResetCount
+ 0, // ResetLimit
+ 0, // ResetTimerInterval
+ 0 // ResetTimeout
+};
+
+/* eof - MiscResetCapabilities.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.dxs b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.dxs
new file mode 100644
index 0000000000..8698317e55
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.dxs
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSubclassDriver.dxs
+
+Abstract:
+
+ Dependency expression file for MiscSubclass Driver.
+
+--*/
+
+#include <AutoGen.h>
+#include <DxeDepex.h>
+
+DEPENDENCY_START
+ EFI_DATA_HUB_PROTOCOL_GUID AND EFI_HII_PROTOCOL_GUID
+DEPENDENCY_END
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.h b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.h
new file mode 100644
index 0000000000..32f591fdf1
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.h
@@ -0,0 +1,104 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSubclassDriver.h
+
+Abstract:
+
+ Header file for MiscSubclass Driver.
+
+--*/
+
+#ifndef _MISC_SUBCLASS_DRIVER_H
+#define _MISC_SUBCLASS_DRIVER_H
+
+
+#include <MiscDevicePath.h>
+
+//
+// Autogen string file
+//
+#include <MiscSubclassStrDefs.h>
+
+//
+// Data table entry update function.
+//
+typedef
+EFI_STATUS
+(EFIAPI EFI_MISC_SUBCLASS_DATA_FUNCTION) (
+ IN UINT16 RecordType,
+ IN UINT32 *RecordLen,
+ IN OUT EFI_MISC_SUBCLASS_RECORDS *RecordData,
+ OUT BOOLEAN *LogRecordData
+ );
+
+//
+// Data table entry definition.
+//
+typedef struct {
+ UINT16 RecordType;
+ UINT32 RecordLen;
+ VOID *RecordData;
+ EFI_MISC_SUBCLASS_DATA_FUNCTION *Function;
+} EFI_MISC_SUBCLASS_DATA_TABLE;
+
+//
+// Data Table extern definitions.
+//
+#define MISC_SUBCLASS_TABLE_EXTERNS(NAME1, NAME2) \
+ extern NAME1 NAME2 ## Data; \
+ extern EFI_MISC_SUBCLASS_DATA_FUNCTION NAME2 ## Function
+
+//
+// Data Table entries
+//
+#define MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(NAME1, NAME2) { \
+ NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, NULL \
+ }
+
+#define MISC_SUBCLASS_TABLE_ENTRY_FUNCTION_ONLY(NAME1, NAME2) \
+ { \
+ NAME1 ## _RECORD_NUMBER, 0, NULL, &NAME2 ## Function \
+ }
+
+#define MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2, NAME3) \
+ { \
+ NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, &NAME3 ## Function \
+ }
+
+//
+// Global definition macros.
+//
+#define MISC_SUBCLASS_TABLE_DATA(NAME1, NAME2) NAME1 NAME2 ## Data
+
+#define MISC_SUBCLASS_TABLE_FUNCTION(NAME2) \
+ EFI_STATUS EFIAPI NAME2 ## Function ( \
+ IN UINT16 RecordType, \
+ IN UINT32 *RecordLen, \
+ IN OUT EFI_MISC_SUBCLASS_RECORDS * RecordData, \
+ OUT BOOLEAN *LogRecordData \
+ )
+
+//
+// Data Table Array
+//
+extern EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable[];
+
+//
+// Data Table Array Entries
+//
+extern UINTN mMiscSubclassDataTableEntries;
+
+#endif /* _MISC_SUBCLASS_DRIVER_H */
+
+/* eof - MiscSubclassDriver.h */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.mbd b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.mbd
new file mode 100644
index 0000000000..921c5c5e41
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.mbd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+-->
+<ModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
+ <MbdHeader>
+ <BaseName>MiscSubclass</BaseName>
+ <Guid>4A9B9DB8-EC62-4A92-818F-8AA0246D246E</Guid>
+ <Version>0</Version>
+ <Description>FIX ME!</Description>
+ <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
+ <License>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ </License>
+ <Created>2006-03-13 17:07</Created>
+ <Modified>2006-03-23 13:50</Modified>
+ </MbdHeader>
+ <Libraries>
+ <Library>UefiBootServicesTableLib</Library>
+ <Library>BaseLib</Library>
+ <Library>UefiLib</Library>
+ <Library>HiiLib</Library>
+ <Library>UefiMemoryLib</Library>
+ <Library>UefiDriverEntryPoint</Library>
+ <Library>DxeReportStatusCodeLib</Library>
+ <Library>BaseDebugLibReportStatusCode</Library>
+ <Library>DxeMemoryAllocationLib</Library>
+ <Library>UefiDevicePathLib</Library>
+ </Libraries>
+ <BuildOptions ToolChain="MSFT">
+ <ImageEntryPoint>_ModuleEntryPoint</ImageEntryPoint>
+ </BuildOptions>
+</ModuleBuildDescription>
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.msa b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.msa
new file mode 100644
index 0000000000..fb5252f0c0
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.msa
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+-->
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
+ <MsaHeader>
+ <BaseName>MiscSubclass</BaseName>
+ <ModuleType>DXE_DRIVER</ModuleType>
+ <ComponentType>BS_DRIVER</ComponentType>
+ <Guid>4A9B9DB8-EC62-4A92-818F-8AA0246D246E</Guid>
+ <Version>0</Version>
+ <Abstract>Component description file for MiscSubclass Driver module</Abstract>
+ <Description>FIX ME!</Description>
+ <Copyright>Copyright (c) 2006, Intel Corporation</Copyright>
+ <License>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ </License>
+ <Specification>0</Specification>
+ <Created>2006-03-13 17:07</Created>
+ <Updated>2006-03-23 13:50</Updated>
+ </MsaHeader>
+ <LibraryClassDefinitions>
+ <LibraryClass Usage="ALWAYS_CONSUMED">BaseLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">HiiLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">UefiLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverEntryPoint</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">MemoryAllocationLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">UefiBootServicesTableLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">DevicePathLib</LibraryClass>
+ </LibraryClassDefinitions>
+ <SourceFiles>
+ <Filename>MiscSubclassDriver.uni</Filename>
+ <Filename>MiscSubclassDriver.h</Filename>
+ <Filename>MiscSubclassDriverEntryPoint.c</Filename>
+ <Filename>MiscSubclassDriverDataTable.c</Filename>
+ <Filename>MiscBaseBoardManufacturerData.c</Filename>
+ <Filename>MiscBiosVendorData.c</Filename>
+ <Filename>MiscBootInformationData.c</Filename>
+ <Filename>MiscChassisManufacturerData.c</Filename>
+ <Filename>MiscNumberOfInstallableLanguagesData.c</Filename>
+ <Filename>MiscOemStringData.c</Filename>
+ <Filename>MiscOnboardDeviceData.c</Filename>
+ <Filename>MiscPortInternalConnectorDesignatorData.c</Filename>
+ <Filename>MiscResetCapabilitiesData.c</Filename>
+ <Filename>MiscSystemLanguageStringData.c</Filename>
+ <Filename>MiscSystemManufacturerData.c</Filename>
+ <Filename>MiscSystemManufacturerFunction.c</Filename>
+ <Filename>MiscSystemOptionStringData.c</Filename>
+ <Filename>MiscSystemSlotDesignationData.c</Filename>
+ <Filename>MiscPortInternalConnectorDesignatorFunction.c</Filename>
+ <Filename>MiscSubclassDriver.dxs</Filename>
+ </SourceFiles>
+ <Includes>
+ <PackageName>MdePkg</PackageName>
+ <PackageName>EdkModulePkg</PackageName>
+ <PackageName>EdkNt32Pkg</PackageName>
+ </Includes>
+ <Protocols>
+ <Protocol Usage="ALWAYS_CONSUMED">DataHub</Protocol>
+ <Protocol Usage="ALWAYS_CONSUMED">Hii</Protocol>
+ <ProtocolNotify Usage="SOMETIMES_CONSUMED">WinNtIo</ProtocolNotify>
+ </Protocols>
+ <DataHubs>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscPortKeyboard</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscPortMouse</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscPortCom1</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscPortCom2</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscBiosVendor</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscSystemManufacturer</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscBaseBoardManufacturer</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscChassisManufacturer</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">MiscSystemSlotDesignation</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">OemString</DataHubRecord>
+ <DataHubRecord Usage="ALWAYS_PRODUCED">SystemOptionString</DataHubRecord>
+ <DataHubRecord Usage="SOMETIMES_CONSUMED">ProcessorSubClassData</DataHubRecord>
+ <DataHubRecord Usage="SOMETIMES_PRODUCED">MemorySubClassData</DataHubRecord>
+ </DataHubs>
+ <Guids>
+ <GuidEntry Usage="ALWAYS_CONSUMED">
+ <C_Name>MiscSubClass</C_Name>
+ </GuidEntry>
+ <GuidEntry Usage="SOMETIMES_CONSUMED">
+ <C_Name>ProcessorSubClass</C_Name>
+ </GuidEntry>
+ <GuidEntry Usage="SOMETIMES_CONSUMED">
+ <C_Name>MemoryProducer</C_Name>
+ </GuidEntry>
+ <GuidEntry Usage="SOMETIMES_CONSUMED">
+ <C_Name>MemorySubClass</C_Name>
+ </GuidEntry>
+ <GuidEntry Usage="SOMETIMES_CONSUMED">
+ <C_Name>WinNtMemory</C_Name>
+ </GuidEntry>
+ </Guids>
+ <Externs>
+ <Extern>
+ <ModuleEntryPoint>MiscSubclassDriverEntryPoint</ModuleEntryPoint>
+ </Extern>
+ </Externs>
+</ModuleSurfaceArea>
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.uni
new file mode 100644
index 0000000000..1d6899c81c
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriver.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverDataTable.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverDataTable.c
new file mode 100644
index 0000000000..c2d149631a
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverDataTable.c
@@ -0,0 +1,103 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSubclassDriverDataTable.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// External definitions referenced by Data Table entries.
+//
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_CHASSIS_MANUFACTURER_DATA,
+ MiscChassisManufacturer
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_BIOS_VENDOR_DATA,
+ MiscBiosVendor
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_SYSTEM_MANUFACTURER_DATA,
+ MiscSystemManufacturer
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_BASE_BOARD_MANUFACTURER_DATA,
+ MiscBaseBoardManufacturer
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA,
+ MiscPortInternalConnectorDesignator
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA,
+ MiscPortKeyboard
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA,
+ MiscPortMouse
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA,
+ MiscPortCom1
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA,
+ MiscPortCom2
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_SYSTEM_SLOT_DESIGNATION_DATA,
+ MiscSystemSlotDesignation
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_ONBOARD_DEVICE_DATA,
+ MiscOnboardDevice
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_OEM_STRING_DATA,
+ OemString
+ );
+MISC_SUBCLASS_TABLE_EXTERNS (
+ EFI_MISC_SYSTEM_OPTION_STRING_DATA,
+ SystemOptionString
+ );
+
+//
+// Data Table.
+//
+EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable[] = {
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR, MiscPortKeyboard, MiscPortInternalConnectorDesignator),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR, MiscPortMouse, MiscPortInternalConnectorDesignator),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR, MiscPortCom1, MiscPortInternalConnectorDesignator),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR, MiscPortCom2, MiscPortInternalConnectorDesignator),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(EFI_MISC_BIOS_VENDOR, MiscBiosVendor),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(EFI_MISC_SYSTEM_MANUFACTURER, MiscSystemManufacturer),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(EFI_MISC_BASE_BOARD_MANUFACTURER, MiscBaseBoardManufacturer),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(EFI_MISC_CHASSIS_MANUFACTURER, MiscChassisManufacturer),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(EFI_MISC_SYSTEM_SLOT_DESIGNATION, MiscSystemSlotDesignation),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(EFI_MISC_OEM_STRING, OemString),
+ MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(EFI_MISC_SYSTEM_OPTION_STRING, SystemOptionString),
+};
+
+//
+// Number of Data Table entries.
+//
+UINTN mMiscSubclassDataTableEntries = (sizeof mMiscSubclassDataTable) / sizeof (EFI_MISC_SUBCLASS_DATA_TABLE);
+
+/* eof - MiscSubclassDriverDataTable.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverEntryPoint.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverEntryPoint.c
new file mode 100644
index 0000000000..f0e09a6152
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSubclassDriverEntryPoint.c
@@ -0,0 +1,518 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSubclassDriverEntryPoint.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+
+extern UINT8 MiscSubclassStrings[];
+
+VOID
+EFIAPI
+WinNtIoProtocolNotifyFunction (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ );
+
+//
+//
+//
+EFI_STATUS
+LogRecordDataToDataHub (
+ EFI_DATA_HUB_PROTOCOL *DataHub,
+ UINT32 RecordType,
+ UINT32 RecordLen,
+ VOID *RecordData
+ )
+/*++
+Description:
+
+Parameters:
+
+ DataHub
+ %%TBD
+
+ RecordType
+ %%TBD
+
+ RecordLen
+ %%TBD
+
+ RecordData
+ %%TBD
+
+Returns:
+
+ EFI_INVALID_PARAMETER
+
+ EFI_SUCCESS
+
+ Other Data Hub errors
+
+--*/
+{
+ EFI_MISC_SUBCLASS_DRIVER_DATA MiscSubclass;
+ EFI_STATUS EfiStatus;
+
+ //
+ // Do nothing if data parameters are not valid.
+ //
+ if (RecordLen == 0 || RecordData == NULL) {
+ DEBUG (
+ (EFI_D_ERROR,
+ "RecordLen == %d RecordData == %xh\n",
+ RecordLen,
+ RecordData)
+ );
+
+ return EFI_INVALID_PARAMETER;
+ }
+ //
+ // Assemble Data Hub record.
+ //
+ MiscSubclass.Header.Version = EFI_MISC_SUBCLASS_VERSION;
+ MiscSubclass.Header.HeaderSize = sizeof (EFI_SUBCLASS_TYPE1_HEADER);
+ MiscSubclass.Header.Instance = 1;
+ MiscSubclass.Header.SubInstance = 1;
+ MiscSubclass.Header.RecordType = RecordType;
+
+ CopyMem (
+ &MiscSubclass.Record,
+ RecordData,
+ RecordLen
+ );
+
+ //
+ // Log Data Hub record.
+ //
+ EfiStatus = DataHub->LogData (
+ DataHub,
+ &gEfiMiscSubClassGuid,
+ &gEfiMiscSubClassGuid,
+ EFI_DATA_RECORD_CLASS_DATA,
+ &MiscSubclass,
+ sizeof (EFI_SUBCLASS_TYPE1_HEADER) + RecordLen
+ );
+
+ if (EFI_ERROR (EfiStatus)) {
+ DEBUG (
+ (EFI_D_ERROR,
+ "LogData(%d bytes) == %r\n",
+ sizeof (EFI_SUBCLASS_TYPE1_HEADER) + RecordLen,
+ EfiStatus)
+ );
+ }
+
+ return EfiStatus;
+}
+
+
+EFI_STATUS
+EFIAPI
+MiscSubclassDriverEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+/*++
+Description:
+
+ Standard EFI driver point. This driver parses the mMiscSubclassDataTable
+ structure and reports any generated data to the DataHub.
+
+Arguments:
+
+ ImageHandle
+ Handle for the image of this driver
+
+ SystemTable
+ Pointer to the EFI System Table
+
+Returns:
+
+ EFI_SUCCESS
+ The data was successfully reported to the Data Hub.
+
+--*/
+{
+ EFI_MISC_SUBCLASS_DRIVER_DATA RecordData;
+ EFI_DATA_HUB_PROTOCOL *DataHub;
+ EFI_HII_PROTOCOL *Hii;
+ EFI_HII_PACKAGES *PackageList;
+ EFI_HII_HANDLE HiiHandle;
+ EFI_STATUS EfiStatus;
+ UINTN Index;
+ BOOLEAN LogRecordData;
+ EFI_EVENT Event;
+ VOID *Registration;
+
+
+ //
+ // Initialize constant portion of subclass header.
+ //
+ RecordData.Header.Version = EFI_MISC_SUBCLASS_VERSION;
+ RecordData.Header.HeaderSize = sizeof (EFI_SUBCLASS_TYPE1_HEADER);
+ RecordData.Header.Instance = 1;
+ RecordData.Header.SubInstance = 1;
+
+ //
+ // Locate data hub protocol.
+ //
+ EfiStatus = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);
+
+ if (EFI_ERROR (EfiStatus)) {
+ DEBUG ((EFI_D_ERROR, "Could not locate DataHub protocol. %r\n", EfiStatus));
+ return EfiStatus;
+ } else if (DataHub == NULL) {
+ DEBUG ((EFI_D_ERROR, "LocateProtocol(DataHub) returned NULL pointer!\n"));
+ return EFI_DEVICE_ERROR;
+ }
+ //
+ // Locate hii protocol.
+ //
+ EfiStatus = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, &Hii);
+
+ if (EFI_ERROR (EfiStatus)) {
+ DEBUG ((EFI_D_ERROR, "Could not locate Hii protocol. %r\n", EfiStatus));
+ return EfiStatus;
+ } else if (Hii == NULL) {
+ DEBUG ((EFI_D_ERROR, "LocateProtocol(Hii) returned NULL pointer!\n"));
+ return EFI_DEVICE_ERROR;
+ }
+ //
+ // Add our default strings to the HII database. They will be modified later.
+ //
+ PackageList = PreparePackages (1, &gEfiMiscSubClassGuid, MiscSubclassStrings);
+ EfiStatus = Hii->NewPack (Hii, PackageList, &HiiHandle);
+ gBS->FreePool (PackageList);
+
+ if (EFI_ERROR (EfiStatus)) {
+ DEBUG ((EFI_D_ERROR, "Could not log default strings to Hii. %r\n", EfiStatus));
+ return EfiStatus;
+ }
+ //
+ //
+ //
+ for (Index = 0; Index < mMiscSubclassDataTableEntries; ++Index) {
+ //
+ // Stupidity check! Do nothing if RecordLen is zero.
+ // %%TBD - Should this be an error or a mechanism for ignoring
+ // records in the Data Table?
+ //
+ if (mMiscSubclassDataTable[Index].RecordLen == 0) {
+ DEBUG (
+ (EFI_D_ERROR,
+ "mMiscSubclassDataTable[%d].RecordLen == 0\n",
+ Index)
+ );
+
+ continue;
+ }
+ //
+ // Initialize per-record portion of subclass header and
+ // copy static data into data portion of subclass record.
+ //
+ RecordData.Header.RecordType = mMiscSubclassDataTable[Index].RecordType;
+
+ if (mMiscSubclassDataTable[Index].RecordData == NULL) {
+ ZeroMem (
+ &RecordData.Record,
+ mMiscSubclassDataTable[Index].RecordLen
+ );
+ } else {
+ CopyMem (
+ &RecordData.Record,
+ mMiscSubclassDataTable[Index].RecordData,
+ mMiscSubclassDataTable[Index].RecordLen
+ );
+ }
+ //
+ // If the entry does not have a function pointer, just log the data.
+ //
+ if (mMiscSubclassDataTable[Index].Function == NULL) {
+ //
+ // Log RecordData to Data Hub.
+ //
+ EfiStatus = DataHub->LogData (
+ DataHub,
+ &gEfiMiscSubClassGuid,
+ &gEfiMiscSubClassGuid,
+ EFI_DATA_RECORD_CLASS_DATA,
+ &RecordData,
+ sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen
+ );
+
+ if (EFI_ERROR (EfiStatus)) {
+ DEBUG (
+ (EFI_D_ERROR,
+ "LogData(%d bytes) == %r\n",
+ sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen,
+ EfiStatus)
+ );
+ }
+
+ continue;
+ }
+ //
+ // The entry has a valid function pointer.
+ // Keep calling the function and logging data until there
+ // is no more data to log.
+ //
+ for (;;) {
+ //
+ //
+ //
+ EfiStatus = (*mMiscSubclassDataTable[Index].Function)
+ (
+ mMiscSubclassDataTable[Index].RecordType, &mMiscSubclassDataTable[Index].RecordLen, &RecordData.Record, &
+ LogRecordData
+ );
+
+ //
+ //
+ //
+ if (EFI_ERROR (EfiStatus)) {
+ break;
+ }
+
+ if (!LogRecordData) {
+ break;
+ }
+ //
+ //
+ //
+ EfiStatus = DataHub->LogData (
+ DataHub,
+ &gEfiMiscSubClassGuid,
+ &gEfiMiscSubClassGuid,
+ EFI_DATA_RECORD_CLASS_DATA,
+ &RecordData,
+ sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen
+ );
+
+ if (EFI_ERROR (EfiStatus)) {
+ DEBUG (
+ (EFI_D_ERROR,
+ "LogData(%d bytes) == %r\n",
+ sizeof (EFI_SUBCLASS_TYPE1_HEADER) + mMiscSubclassDataTable[Index].RecordLen,
+ EfiStatus)
+ );
+ }
+ }
+ }
+ //
+ // Install notify function to fetch memory data through WinNtIo protocol and store to data hub.
+ //
+ EfiStatus = gBS->CreateEvent (
+ EFI_EVENT_NOTIFY_SIGNAL,
+ EFI_TPL_CALLBACK,
+ WinNtIoProtocolNotifyFunction,
+ ImageHandle,
+ &Event
+ );
+ ASSERT (!EFI_ERROR (EfiStatus));
+
+ EfiStatus = gBS->RegisterProtocolNotify (
+ &gEfiWinNtIoProtocolGuid,
+ Event,
+ &Registration
+ );
+ ASSERT (!EFI_ERROR (EfiStatus));
+
+ return EFI_SUCCESS;
+}
+
+UINTN
+Atoi (
+ CHAR16 *String
+ )
+/*++
+
+Routine Description:
+ Convert a unicode string to a UINTN
+
+Arguments:
+ String - Unicode string.
+
+Returns:
+ UINTN of the number represented by String.
+
+--*/
+{
+ UINTN Number;
+ CHAR16 *Str;
+
+ //
+ // skip preceeding white space
+ //
+ Str = String;
+ while ((*Str) && (*Str == ' ' || *Str == '"')) {
+ Str++;
+ }
+ //
+ // Convert ot a Number
+ //
+ Number = 0;
+ while (*Str != '\0') {
+ if ((*Str >= '0') && (*Str <= '9')) {
+ Number = (Number * 10) +*Str - '0';
+ } else {
+ break;
+ }
+
+ Str++;
+ }
+
+ return Number;
+}
+
+VOID
+EFIAPI
+WinNtIoProtocolNotifyFunction (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
+/*++
+
+Routine Description:
+ This function will log memory size data to data hub.
+
+Arguments:
+Event - Event whose notification function is being invoked.
+Context - Pointer to the notification function's context.
+
+Returns:
+ EFI_STATUS.
+
+--*/
+{
+ EFI_STATUS Status;
+ EFI_MEMORY_SUBCLASS_DRIVER_DATA MemorySubClassData;
+ EFI_DATA_RECORD_HEADER *Record;
+ EFI_SUBCLASS_TYPE1_HEADER *DataHeader;
+ UINTN HandleCount;
+ UINTN HandleIndex;
+ UINT64 MonotonicCount;
+ BOOLEAN RecordFound;
+ EFI_HANDLE *HandleBuffer;
+ EFI_WIN_NT_IO_PROTOCOL *WinNtIo;
+ EFI_DATA_HUB_PROTOCOL *DataHub;
+ UINT64 TotalMemorySize;
+
+ DataHub = NULL;
+ MonotonicCount = 0;
+ RecordFound = FALSE;
+
+ //
+ // Retrieve the list of all handles from the handle database.
+ //
+ Status = gBS->LocateHandleBuffer (
+ AllHandles,
+ &gEfiWinNtIoProtocolGuid,
+ NULL,
+ &HandleCount,
+ &HandleBuffer
+ );
+ if (EFI_ERROR (Status)) {
+ return ;
+ }
+ //
+ // Locate DataHub protocol.
+ //
+ Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);
+ if (EFI_ERROR (Status)) {
+ return ;
+ }
+ //
+ // Search the Handle array to find the meory size information.
+ //
+ for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) {
+ Status = gBS->OpenProtocol (
+ HandleBuffer[HandleIndex],
+ &gEfiWinNtIoProtocolGuid,
+ &WinNtIo,
+ Context,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (EFI_ERROR (Status)) {
+ continue;
+ }
+
+ if ((WinNtIo->WinNtThunk->Signature == EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE) &&
+ CompareGuid (WinNtIo->TypeGuid, &gEfiWinNtMemoryGuid)
+ ) {
+ //
+ // Check if this record has been stored in data hub.
+ //
+ do {
+ Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record);
+ if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {
+ DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);
+ if (CompareGuid (&Record->DataRecordGuid, &gEfiProcessorSubClassGuid) &&
+ (DataHeader->RecordType == EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER)
+ ) {
+ RecordFound = TRUE;
+ }
+ }
+ } while (MonotonicCount != 0);
+
+ if (RecordFound) {
+ RecordFound = FALSE;
+ continue;
+ }
+ //
+ // Initialize data record.
+ //
+ MemorySubClassData.Header.Instance = 1;
+ MemorySubClassData.Header.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;
+ MemorySubClassData.Header.RecordType = EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER;
+
+ TotalMemorySize = (UINT64) Atoi (WinNtIo->EnvString);
+
+ MemorySubClassData.Record.ArrayStartAddress.MemoryArrayStartAddress = 0;
+ MemorySubClassData.Record.ArrayStartAddress.MemoryArrayEndAddress = LShiftU64 (TotalMemorySize, 20) - 1;
+ MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.ProducerName = gEfiMemoryProducerGuid;
+ MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.Instance = 1;
+ MemorySubClassData.Record.ArrayStartAddress.PhysicalMemoryArrayLink.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;
+ MemorySubClassData.Record.ArrayStartAddress.MemoryArrayPartitionWidth = 0;
+
+ //
+ // Store memory size data record to data hub.
+ //
+ Status = DataHub->LogData (
+ DataHub,
+ &gEfiMemorySubClassGuid,
+ &gEfiMemoryProducerGuid,
+ EFI_DATA_RECORD_CLASS_DATA,
+ &MemorySubClassData,
+ sizeof (EFI_SUBCLASS_TYPE1_HEADER) + sizeof (EFI_MEMORY_ARRAY_START_ADDRESS_DATA)
+ );
+ }
+
+ gBS->CloseProtocol (
+ HandleBuffer[HandleIndex],
+ &gEfiWinNtIoProtocolGuid,
+ Context,
+ NULL
+ );
+ }
+}
+
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageString.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageString.uni
new file mode 100644
index 0000000000..36dacf066a
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageString.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageStringData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageStringData.c
new file mode 100644
index 0000000000..ef52513d58
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemLanguageStringData.c
@@ -0,0 +1,33 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSystemLanguageStringData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_SYSTEM_LANGUAGE_STRING_DATA, SystemLanguageString) = {
+ 0,
+ STRING_TOKEN(STR_MISC_SYSTEM_LANGUAGE_STRING)
+};
+
+/* eof - MiscSystemLanguageStringData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturer.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturer.uni
new file mode 100644
index 0000000000..204588ef8c
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturer.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerData.c
new file mode 100644
index 0000000000..be53e39a71
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerData.c
@@ -0,0 +1,55 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSystemManufacturerData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) System Manufacturer data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_SYSTEM_MANUFACTURER_DATA, MiscSystemManufacturer)
+= {
+ STRING_TOKEN(STR_MISC_SYSTEM_MANUFACTURER),
+ // SystemManufactrurer
+ STRING_TOKEN(STR_MISC_SYSTEM_PRODUCT_NAME),
+ // SystemProductName
+ STRING_TOKEN(STR_MISC_SYSTEM_VERSION),
+ // SystemVersion
+ STRING_TOKEN(STR_MISC_SYSTEM_SERIAL_NUMBER),
+ // SystemSerialNumber
+ {
+ 0xbadfaced,
+ 0xdead,
+ 0xbeef,
+ 0x13,
+ 0x13,
+ 0x13,
+ 0x13,
+ 0x13,
+ 0x13,
+ 0x13,
+ 0x13
+ },
+ // SystemUuid
+ EfiSystemWakeupTypePowerSwitch // SystemWakeupType
+};
+
+/* eof - MiscSystemManufacturerData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerFunction.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerFunction.c
new file mode 100644
index 0000000000..ddd749bfdb
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemManufacturerFunction.c
@@ -0,0 +1,122 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSystemManufacturerFunction.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+//
+//
+MISC_SUBCLASS_TABLE_FUNCTION (
+ MiscSystemManufacturer
+ )
+/*++
+Description:
+
+ This function makes boot time changes to the contents of the
+ MiscSystemManufacturer (Type 13).
+
+Parameters:
+
+ RecordType
+ Type of record to be processed from the Data Table.
+ mMiscSubclassDataTable[].RecordType
+
+ RecordLen
+ Size of static RecordData from the Data Table.
+ mMiscSubclassDataTable[].RecordLen
+
+ RecordData
+ Pointer to copy of RecordData from the Data Table. Changes made
+ to this copy will be written to the Data Hub but will not alter
+ the contents of the static Data Table.
+
+ LogRecordData
+ Set *LogRecordData to TRUE to log RecordData to Data Hub.
+ Set *LogRecordData to FALSE when there is no more data to log.
+
+Returns:
+
+ EFI_SUCCESS
+ All parameters were valid and *RecordData and *LogRecordData have
+ been set.
+
+ EFI_UNSUPPORTED
+ Unexpected RecordType value.
+
+ EFI_INVALID_PARAMETER
+ One of the following parameter conditions was true:
+ RecordLen was zero.
+ RecordData was NULL.
+ LogRecordData was NULL.
+--*/
+{
+ STATIC BOOLEAN Done = FALSE;
+
+ //
+ // First check for invalid parameters.
+ //
+ if (*RecordLen == 0 || RecordData == NULL || LogRecordData == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+ //
+ // Then check for unsupported RecordType.
+ //
+ if (RecordType != EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER) {
+ return EFI_UNSUPPORTED;
+ }
+ //
+ // Is this the first time through this function?
+ //
+ if (!Done) {
+ //
+ // Yes, this is the first time. Inspect/Change the contents of the
+ // RecordData structure.
+ //
+ //
+ // Set system GUID.
+ //
+ // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemUuid = %%TBD
+ //
+ // Set power-on type.
+ //
+ // ((EFI_MISC_SYSTEM_MANUFACTURER_DATA *)RecordData)->SystemWakeupType = %%TBD
+ //
+ // Set Done flag to TRUE for next pass through this function.
+ // Set *LogRecordData to TRUE so data will get logged to Data Hub.
+ //
+ Done = TRUE;
+ *LogRecordData = TRUE;
+ } else {
+ //
+ // No, this is the second time. Reset the state of the Done flag
+ // to FALSE and tell the data logger that there is no more data
+ // to be logged for this record type. If any memory allocations
+ // were made by earlier passes, they must be released now.
+ //
+ Done = FALSE;
+ *LogRecordData = FALSE;
+ }
+
+ return EFI_SUCCESS;
+}
+
+/* eof - MiscSystemManufacturerFunction.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionString.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionString.uni
new file mode 100644
index 0000000000..617578d6a3
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionString.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionStringData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionStringData.c
new file mode 100644
index 0000000000..8c00350f64
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemOptionStringData.c
@@ -0,0 +1,32 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSystemOptionStringData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_SYSTEM_OPTION_STRING_DATA, SystemOptionString) = {
+ STRING_TOKEN(STR_MISC_SYSTEM_OPTION_STRING)
+};
+
+/* eof - MiscSystemOptionStringData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignation.uni b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignation.uni
new file mode 100644
index 0000000000..f279ff960d
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignation.uni
Binary files differ
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignationData.c b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignationData.c
new file mode 100644
index 0000000000..d5e1474fe2
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/MiscSystemSlotDesignationData.c
@@ -0,0 +1,52 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ MiscSystemSlotDesignationData.c
+
+Abstract:
+
+ This driver parses the mMiscSubclassDataTable structure and reports
+ any generated data to the DataHub.
+
+--*/
+
+#include "MiscSubclassDriver.h"
+
+//
+// Static (possibly build generated) Bios Vendor data.
+//
+MISC_SUBCLASS_TABLE_DATA(EFI_MISC_SYSTEM_SLOT_DESIGNATION_DATA, MiscSystemSlotDesignation) = {
+ STRING_TOKEN(STR_MISC_SYSTEM_SLOT_DESIGNATION), // SlotDesignation
+ EfiSlotTypeOther, // SlotType
+ EfiSlotDataBusWidthOther, // SlotDataBusWidth
+ EfiSlotUsageOther, // SlotUsage
+ EfiSlotLengthOther, // SlotLength
+ 0, // SlotId
+ { // SlotCharacteristics
+ 0, // CharacteristicsUnknown :1;
+ 0, // Provides50Volts :1;
+ 0, // Provides33Volts :1;
+ 0, // SharedSlot :1;
+ 0, // PcCard16Supported :1;
+ 0, // CardBusSupported :1;
+ 0, // ZoomVideoSupported :1;
+ 0, // ModemRingResumeSupported:1;
+ 0, // PmeSignalSupported :1;
+ 0, // HotPlugDevicesSupported :1;
+ 0, // SmbusSignalSupported :1;
+ 0 // Reserved :21;
+ },
+ 0 // SlotDevicePath
+};
+
+/* eof - MiscSystemSlotsData.c */
diff --git a/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/build.xml b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/build.xml
new file mode 100644
index 0000000000..7265194134
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/Nt32Platform/MiscSubclass/build.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
+<project basedir="." default="MiscSubclass"><!--Apply external ANT tasks-->
+ <taskdef resource="GenBuild.tasks"/>
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+ <property environment="env"/>
+ <property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>
+ <import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->
+ <property name="MODULE_RELATIVE_PATH" value="Dxe\Nt32Platform\MiscSubclass"/>
+ <property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
+ <property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
+ <target name="MiscSubclass">
+ <GenBuild baseName="MiscSubclass" mbdFilename="${MODULE_DIR}\MiscSubclassDriver.mbd" msaFilename="${MODULE_DIR}\MiscSubclassDriver.msa"/>
+ </target>
+ <target depends="MiscSubclass_clean" name="clean"/>
+ <target depends="MiscSubclass_cleanall" name="cleanall"/>
+ <target name="MiscSubclass_clean">
+ <OutputDirSetup baseName="MiscSubclass" mbdFilename="${MODULE_DIR}\MiscSubclassDriver.mbd" msaFilename="${MODULE_DIR}\MiscSubclassDriver.msa"/>
+ <if>
+ <available file="${DEST_DIR_OUTPUT}\MiscSubclass_build.xml"/>
+ <then>
+ <ant antfile="${DEST_DIR_OUTPUT}\MiscSubclass_build.xml" target="clean"/>
+ </then>
+ </if>
+ <delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
+ </target>
+ <target name="MiscSubclass_cleanall">
+ <OutputDirSetup baseName="MiscSubclass" mbdFilename="${MODULE_DIR}\MiscSubclassDriver.mbd" msaFilename="${MODULE_DIR}\MiscSubclassDriver.msa"/>
+ <if>
+ <available file="${DEST_DIR_OUTPUT}\MiscSubclass_build.xml"/>
+ <then>
+ <ant antfile="${DEST_DIR_OUTPUT}\MiscSubclass_build.xml" target="cleanall"/>
+ </then>
+ </if>
+ <delete dir="${DEST_DIR_OUTPUT}"/>
+ <delete dir="${DEST_DIR_DEBUG}"/>
+ <delete>
+ <fileset dir="${BIN_DIR}" includes="**MiscSubclass*"/>
+ </delete>
+ </target>
+</project> \ No newline at end of file