diff options
author | Ray Ni <ray.ni@intel.com> | 2019-05-17 12:55:16 +0800 |
---|---|---|
committer | Ray Ni <ray.ni@intel.com> | 2019-05-17 13:02:41 +0800 |
commit | 7afa0cea8f2ccedc231f1208609148a38c958a64 (patch) | |
tree | 0708388e074d718f7a651998929cf0a84c08525d /Nt32Pkg/WinNtBusDriverDxe | |
parent | 4d5d7812786db947e476b4d850698b465d0e2d99 (diff) | |
download | edk2-7afa0cea8f2ccedc231f1208609148a38c958a64.zip edk2-7afa0cea8f2ccedc231f1208609148a38c958a64.tar.gz edk2-7afa0cea8f2ccedc231f1208609148a38c958a64.tar.bz2 |
Nt32Pkg: Remove it
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1812
Now since EmulatorPkg supports to run in Windows environment,
this patch removes Nt32Pkg to remove duplicate code in edk2 repo.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'Nt32Pkg/WinNtBusDriverDxe')
-rw-r--r-- | Nt32Pkg/WinNtBusDriverDxe/ComponentName.c | 375 | ||||
-rw-r--r-- | Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c | 799 | ||||
-rw-r--r-- | Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.h | 317 | ||||
-rw-r--r-- | Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriverDxe.inf | 80 |
4 files changed, 0 insertions, 1571 deletions
diff --git a/Nt32Pkg/WinNtBusDriverDxe/ComponentName.c b/Nt32Pkg/WinNtBusDriverDxe/ComponentName.c deleted file mode 100644 index 70e9545..0000000 --- a/Nt32Pkg/WinNtBusDriverDxe/ComponentName.c +++ /dev/null @@ -1,375 +0,0 @@ -/**@file
-
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-Module Name:
-
- ComponentName.c
-
-Abstract:
-
-**/
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-#include <WinNtDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/WinNtThunk.h>
-#include <Protocol/WinNtIo.h>
-#include <Protocol/ComponentName.h>
-#include <Protocol/DriverBinding.h>
-#include <Protocol/DevicePath.h>
-
-
-#include "WinNtBusDriver.h"
-
-//
-// EFI Component Name Functions
-//
-/**
- Retrieves a Unicode string that is the user readable name of the driver.
-
- This function retrieves the user readable name of a driver in the form of a
- Unicode string. If the driver specified by This has a user readable name in
- the language specified by Language, then a pointer to the driver name is
- returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
- by This does not support the language specified by Language,
- then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified
- in RFC 4646 or ISO 639-2 language code format.
-
- @param DriverName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- driver specified by This in the language
- specified by Language.
-
- @retval EFI_SUCCESS The Unicode string for the Driver specified by
- This and the language specified by Language was
- returned in DriverName.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER DriverName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-WinNtBusDriverComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- );
-
-
-/**
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by a driver.
-
- This function retrieves the user readable name of the controller specified by
- ControllerHandle and ChildHandle in the form of a Unicode string. If the
- driver specified by This has a user readable name in the language specified by
- Language, then a pointer to the controller name is returned in ControllerName,
- and EFI_SUCCESS is returned. If the driver specified by This is not currently
- managing the controller specified by ControllerHandle and ChildHandle,
- then EFI_UNSUPPORTED is returned. If the driver specified by This does not
- support the language specified by Language, then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param ControllerHandle[in] The handle of a controller that the driver
- specified by This is managing. This handle
- specifies the controller whose name is to be
- returned.
-
- @param ChildHandle[in] The handle of the child controller to retrieve
- the name of. This is an optional parameter that
- may be NULL. It will be NULL for device
- drivers. It will also be NULL for a bus drivers
- that wish to retrieve the name of the bus
- controller. It will not be NULL for a bus
- driver that wishes to retrieve the name of a
- child controller.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified in
- RFC 4646 or ISO 639-2 language code format.
-
- @param ControllerName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- controller specified by ControllerHandle and
- ChildHandle in the language specified by
- Language from the point of view of the driver
- specified by This.
-
- @retval EFI_SUCCESS The Unicode string for the user readable name in
- the language specified by Language for the
- driver specified by This was returned in
- DriverName.
-
- @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
-
- @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER ControllerName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-WinNtBusDriverComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- );
-
-
-//
-// EFI Component Name Protocol
-//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gWinNtBusDriverComponentName = {
- WinNtBusDriverComponentNameGetDriverName,
- WinNtBusDriverComponentNameGetControllerName,
- "eng"
-};
-
-//
-// EFI Component Name 2 Protocol
-//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gWinNtBusDriverComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) WinNtBusDriverComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) WinNtBusDriverComponentNameGetControllerName,
- "en"
-};
-
-
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mWinNtBusDriverNameTable[] = {
- { "eng;en", L"Windows Bus Driver" },
- { NULL , NULL }
-};
-
-/**
- Retrieves a Unicode string that is the user readable name of the driver.
-
- This function retrieves the user readable name of a driver in the form of a
- Unicode string. If the driver specified by This has a user readable name in
- the language specified by Language, then a pointer to the driver name is
- returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
- by This does not support the language specified by Language,
- then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified
- in RFC 4646 or ISO 639-2 language code format.
-
- @param DriverName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- driver specified by This in the language
- specified by Language.
-
- @retval EFI_SUCCESS The Unicode string for the Driver specified by
- This and the language specified by Language was
- returned in DriverName.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER DriverName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-WinNtBusDriverComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- )
-{
- return LookupUnicodeString2 (
- Language,
- This->SupportedLanguages,
- mWinNtBusDriverNameTable,
- DriverName,
- (BOOLEAN)(This == &gWinNtBusDriverComponentName)
- );
-}
-
-/**
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by a driver.
-
- This function retrieves the user readable name of the controller specified by
- ControllerHandle and ChildHandle in the form of a Unicode string. If the
- driver specified by This has a user readable name in the language specified by
- Language, then a pointer to the controller name is returned in ControllerName,
- and EFI_SUCCESS is returned. If the driver specified by This is not currently
- managing the controller specified by ControllerHandle and ChildHandle,
- then EFI_UNSUPPORTED is returned. If the driver specified by This does not
- support the language specified by Language, then EFI_UNSUPPORTED is returned.
-
- @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
- EFI_COMPONENT_NAME_PROTOCOL instance.
-
- @param ControllerHandle[in] The handle of a controller that the driver
- specified by This is managing. This handle
- specifies the controller whose name is to be
- returned.
-
- @param ChildHandle[in] The handle of the child controller to retrieve
- the name of. This is an optional parameter that
- may be NULL. It will be NULL for device
- drivers. It will also be NULL for a bus drivers
- that wish to retrieve the name of the bus
- controller. It will not be NULL for a bus
- driver that wishes to retrieve the name of a
- child controller.
-
- @param Language[in] A pointer to a Null-terminated ASCII string
- array indicating the language. This is the
- language of the driver name that the caller is
- requesting, and it must match one of the
- languages specified in SupportedLanguages. The
- number of languages supported by a driver is up
- to the driver writer. Language is specified in
- RFC 4646 or ISO 639-2 language code format.
-
- @param ControllerName[out] A pointer to the Unicode string to return.
- This Unicode string is the name of the
- controller specified by ControllerHandle and
- ChildHandle in the language specified by
- Language from the point of view of the driver
- specified by This.
-
- @retval EFI_SUCCESS The Unicode string for the user readable name in
- the language specified by Language for the
- driver specified by This was returned in
- DriverName.
-
- @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
-
- @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
-
- @retval EFI_INVALID_PARAMETER Language is NULL.
-
- @retval EFI_INVALID_PARAMETER ControllerName is NULL.
-
- @retval EFI_UNSUPPORTED The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
-
- @retval EFI_UNSUPPORTED The driver specified by This does not support
- the language specified by Language.
-
-**/
-EFI_STATUS
-EFIAPI
-WinNtBusDriverComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- )
-{
- EFI_STATUS Status;
- EFI_WIN_NT_IO_PROTOCOL *WinNtIo;
- WIN_NT_IO_DEVICE *Private;
-
- //
- // Make sure this driver is currently managing ControllHandle
- //
- Status = EfiTestManagedDevice (
- ControllerHandle,
- gWinNtBusDriverBinding.DriverBindingHandle,
- &gEfiWinNtThunkProtocolGuid
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // This is a bus driver, so ChildHandle can not be NULL.
- //
- if (ChildHandle == NULL) {
- return EFI_UNSUPPORTED;
- }
-
- Status = EfiTestChildHandle (
- ControllerHandle,
- ChildHandle,
- &gEfiWinNtThunkProtocolGuid
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Get our context back
- //
- Status = gBS->OpenProtocol (
- ChildHandle,
- &gEfiWinNtIoProtocolGuid,
- (VOID **) &WinNtIo,
- gWinNtBusDriverBinding.DriverBindingHandle,
- ChildHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- Private = WIN_NT_IO_DEVICE_FROM_THIS (WinNtIo);
-
- return LookupUnicodeString2 (
- Language,
- This->SupportedLanguages,
- Private->ControllerNameTable,
- ControllerName,
- (BOOLEAN)(This == &gWinNtBusDriverComponentName)
- );
-}
diff --git a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c b/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c deleted file mode 100644 index f4b7e1b..0000000 --- a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c +++ /dev/null @@ -1,799 +0,0 @@ -/**@file
-
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
-(C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-Module Name:
-
- WinNtBusDriver.c
-
-Abstract:
-
-This following section documents the envirnoment variables for the Win NT
-build. These variables are used to define the (virtual) hardware
-configuration of the NT environment
-
-A ! can be used to seperate multiple instances in a variable. Each
-instance represents a seperate hardware device.
-
-EFI_WIN_NT_PHYSICAL_DISKS - maps to drives on your system
-EFI_WIN_NT_VIRTUAL_DISKS - maps to a device emulated by a file
-EFI_WIN_NT_FILE_SYSTEM - mouts a directory as a file system
-EFI_WIN_NT_CONSOLE - make a logical comand line window (only one!)
-EFI_WIN_NT_GOP - Builds GOP Windows of Width and Height
-EFI_WIN_NT_SERIAL_PORT - maps physical serial ports
-
- <F>ixed - Fixed disk like a hard drive.
- <R>emovable - Removable media like a floppy or CD-ROM.
- Read <O>nly - Write protected device.
- Read <W>rite - Read write device.
- <block count> - Decimal number of blocks a device supports.
- <block size> - Decimal number of bytes per block.
-
- NT envirnonment variable contents. '<' and '>' are not part of the variable,
- they are just used to make this help more readable. There should be no
- spaces between the ';'. Extra spaces will break the variable. A '!' is
- used to seperate multiple devices in a variable.
-
- EFI_WIN_NT_VIRTUAL_DISKS =
- <F | R><O | W>;<block count>;<block size>[!...]
-
- EFI_WIN_NT_PHYSICAL_DISKS =
- <drive letter>:<F | R><O | W>;<block count>;<block size>[!...]
-
- Virtual Disks: These devices use a file to emulate a hard disk or removable
- media device.
-
- Thus a 20 MB emulated hard drive would look like:
- EFI_WIN_NT_VIRTUAL_DISKS=FW;40960;512
-
- A 1.44MB emulated floppy with a block size of 1024 would look like:
- EFI_WIN_NT_VIRTUAL_DISKS=RW;1440;1024
-
- Physical Disks: These devices use NT to open a real device in your system
-
- Thus a 120 MB floppy would look like:
- EFI_WIN_NT_PHYSICAL_DISKS=B:RW;245760;512
-
- Thus a standard CD-ROM floppy would look like:
- EFI_WIN_NT_PHYSICAL_DISKS=Z:RO;307200;2048
-
- EFI_WIN_NT_FILE_SYSTEM =
- <directory path>[!...]
-
- Mounting the two directories C:\FOO and C:\BAR would look like:
- EFI_WIN_NT_FILE_SYSTEM=c:\foo!c:\bar
-
- EFI_WIN_NT_CONSOLE =
- <window title>
-
- Declaring a text console window with the title "My EFI Console" woild look like:
- EFI_WIN_NT_CONSOLE=My EFI Console
-
- EFI_WIN_NT_GOP =
- <width> <height>[!...]
-
- Declaring a two GOP windows with resolutions of 800x600 and 1024x768 would look like:
- Example : EFI_WIN_NT_GOP=800 600!1024 768
-
- EFI_WIN_NT_SERIAL_PORT =
- <port name>[!...]
-
- Declaring two serial ports on COM1 and COM2 would look like:
- Example : EFI_WIN_NT_SERIAL_PORT=COM1!COM2
-
- EFI_WIN_NT_PASS_THROUGH =
- <BaseAddress>;<Bus#>;<Device#>;<Function#>
-
- Declaring a base address of 0xE0000000 (used for PCI Express devices)
- and having NT32 talk to a device located at bus 0, device 1, function 0:
- Example : EFI_WIN_NT_PASS_THROUGH=E000000;0;1;0
-
----*/
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-#include <WinNtDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/WinNtThunk.h>
-#include <Protocol/WinNtIo.h>
-#include <Protocol/ComponentName.h>
-#include <Protocol/DriverBinding.h>
-#include <Protocol/DevicePath.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
-
-#include "WinNtBusDriver.h"
-
-extern EFI_GUID gWinNtBusDriverGuid;
-//
-// DriverBinding protocol global
-//
-EFI_DRIVER_BINDING_PROTOCOL gWinNtBusDriverBinding = {
- WinNtBusDriverBindingSupported,
- WinNtBusDriverBindingStart,
- WinNtBusDriverBindingStop,
- 0xa,
- NULL,
- NULL
-};
-
-#define NT_PCD_ARRAY_SIZE (sizeof(mPcdEnvironment)/sizeof(NT_PCD_ENTRY))
-
-//
-// Table to map NT Environment variable to the GUID that should be in
-// device path.
-//
-NT_PCD_ENTRY mPcdEnvironment[] = {
- PcdToken(PcdWinNtConsole), &gEfiWinNtConsoleGuid,
- PcdToken(PcdWinNtGop), &gEfiWinNtGopGuid,
- PcdToken(PcdWinNtSerialPort), &gEfiWinNtSerialPortGuid,
- PcdToken(PcdWinNtFileSystem), &gEfiWinNtFileSystemGuid,
- PcdToken(PcdWinNtVirtualDisk), &gEfiWinNtVirtualDisksGuid,
- PcdToken(PcdWinNtPhysicalDisk), &gEfiWinNtPhysicalDisksGuid
-};
-
-/**
- The user Entry Point for module WinNtBusDriver. The user code starts with this function.
-
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
- @param[in] SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The entry point is executed successfully.
- @retval other Some error occurs when executing this entry point.
-
-**/
-EFI_STATUS
-EFIAPI
-InitializeWinNtBusDriver(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
-
- //
- // Install driver model protocol(s).
- //
- Status = EfiLibInstallDriverBindingComponentName2 (
- ImageHandle,
- SystemTable,
- &gWinNtBusDriverBinding,
- ImageHandle,
- &gWinNtBusDriverComponentName,
- &gWinNtBusDriverComponentName2
- );
- ASSERT_EFI_ERROR (Status);
-
-
- return Status;
-}
-
-VOID *
-AllocateMemory (
- IN UINTN Size
- )
-{
- VOID *Buffer;
-
- Buffer = AllocatePool (Size);
- ASSERT (Buffer != NULL);
-
- return Buffer;
-}
-
-
-EFI_STATUS
-EFIAPI
-WinNtBusDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
-**/
-// TODO: This - add argument and description to function comment
-// TODO: ControllerHandle - add argument and description to function comment
-// TODO: RemainingDevicePath - add argument and description to function comment
-// TODO: EFI_UNSUPPORTED - add return value to function comment
-// TODO: EFI_UNSUPPORTED - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-{
- EFI_STATUS Status;
- EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
- EFI_WIN_NT_THUNK_PROTOCOL *WinNtThunk;
- UINTN Index;
-
- //
- // Check the contents of the first Device Path Node of RemainingDevicePath to make sure
- // it is a legal Device Path Node for this bus driver's children.
- //
- if (RemainingDevicePath != NULL) {
- //
- // Check if RemainingDevicePath is the End of Device Path Node,
- // if yes, go on checking other conditions
- //
- if (!IsDevicePathEnd (RemainingDevicePath)) {
- //
- // If RemainingDevicePath isn't the End of Device Path Node,
- // check its validation
- //
- if (RemainingDevicePath->Type != HARDWARE_DEVICE_PATH ||
- RemainingDevicePath->SubType != HW_VENDOR_DP ||
- DevicePathNodeLength(RemainingDevicePath) != sizeof(WIN_NT_VENDOR_DEVICE_PATH_NODE)) {
- return EFI_UNSUPPORTED;
- }
-
- for (Index = 0; Index < NT_PCD_ARRAY_SIZE; Index++) {
- if (CompareGuid (&((VENDOR_DEVICE_PATH *) RemainingDevicePath)->Guid, mPcdEnvironment[Index].DevicePathGuid)) {
- break;
- }
- }
-
- if (Index >= NT_PCD_ARRAY_SIZE) {
- return EFI_UNSUPPORTED;
- }
- }
- }
-
- //
- // Open the IO Abstraction(s) needed to perform the supported test
- //
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiWinNtThunkProtocolGuid,
- (VOID **) &WinNtThunk,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (Status == EFI_ALREADY_STARTED) {
- return EFI_SUCCESS;
- }
-
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Close the I/O Abstraction(s) used to perform the supported test
- //
- gBS->CloseProtocol (
- ControllerHandle,
- &gEfiWinNtThunkProtocolGuid,
- This->DriverBindingHandle,
- ControllerHandle
- );
-
- //
- // Open the EFI Device Path protocol needed to perform the supported test
- //
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiDevicePathProtocolGuid,
- (VOID **) &ParentDevicePath,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (Status == EFI_ALREADY_STARTED) {
- return EFI_SUCCESS;
- }
-
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Since we call through WinNtThunk we need to make sure it's valid
- //
- Status = EFI_SUCCESS;
- if (WinNtThunk->Signature != EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE) {
- Status = EFI_UNSUPPORTED;
- }
-
- //
- // Close protocol, don't use device path protocol in the Support() function
- //
- gBS->CloseProtocol (
- ControllerHandle,
- &gEfiDevicePathProtocolGuid,
- This->DriverBindingHandle,
- ControllerHandle
- );
-
- return Status;
-}
-
-EFI_STATUS
-EFIAPI
-WinNtBusDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: ControllerHandle - add argument and description to function comment
-// TODO: RemainingDevicePath - add argument and description to function comment
-// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
-// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-{
- EFI_STATUS Status;
- EFI_WIN_NT_THUNK_PROTOCOL *WinNtThunk;
- EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
- WIN_NT_BUS_DEVICE *WinNtBusDevice;
- WIN_NT_IO_DEVICE *WinNtDevice;
- UINTN Index;
- CHAR16 *StartString;
- CHAR16 *SubString;
- UINT16 Count;
- UINTN StringSize;
- UINT16 ComponentName[MAX_NT_ENVIRNMENT_VARIABLE_LENGTH];
- WIN_NT_VENDOR_DEVICE_PATH_NODE *Node;
- BOOLEAN CreateDevice;
- CHAR16 *TempStr;
- CHAR16 *PcdTempStr;
- UINTN TempStrSize;
-
- Status = EFI_UNSUPPORTED;
-
- //
- // Grab the protocols we need
- //
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiDevicePathProtocolGuid,
- (VOID **) &ParentDevicePath,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
- return Status;
- }
-
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiWinNtThunkProtocolGuid,
- (VOID **) &WinNtThunk,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
- );
- if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
- return Status;
- }
-
- if (Status != EFI_ALREADY_STARTED) {
- WinNtBusDevice = AllocatePool (sizeof (WIN_NT_BUS_DEVICE));
- if (WinNtBusDevice == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- WinNtBusDevice->Signature = WIN_NT_BUS_DEVICE_SIGNATURE;
- WinNtBusDevice->ControllerNameTable = NULL;
-
- AddUnicodeString2 (
- "eng",
- gWinNtBusDriverComponentName.SupportedLanguages,
- &WinNtBusDevice->ControllerNameTable,
- L"Windows Bus Controller",
- TRUE
- );
- AddUnicodeString2 (
- "en",
- gWinNtBusDriverComponentName2.SupportedLanguages,
- &WinNtBusDevice->ControllerNameTable,
- L"Windows Bus Controller",
- FALSE
- );
-
-
- Status = gBS->InstallMultipleProtocolInterfaces (
- &ControllerHandle,
- &gWinNtBusDriverGuid,
- WinNtBusDevice,
- NULL
- );
- if (EFI_ERROR (Status)) {
- FreeUnicodeStringTable (WinNtBusDevice->ControllerNameTable);
- FreePool (WinNtBusDevice);
- return Status;
- }
- }
-
- //
- // Loop on the Variable list. Parse each variable to produce a set of handles that
- // represent virtual hardware devices.
- //
- for (Index = 0; Index < NT_PCD_ARRAY_SIZE; Index++) {
- PcdTempStr = (VOID *)LibPcdGetPtr (mPcdEnvironment[Index].Token);
- ASSERT (PcdTempStr != NULL);
-
- TempStrSize = StrLen (PcdTempStr);
- TempStr = AllocateMemory (((TempStrSize + 1) * sizeof (CHAR16)));
- StrCpy (TempStr, PcdTempStr);
-
- StartString = TempStr;
-
- //
- // Parse the envirnment variable into sub strings using '!' as a delimator.
- // Each substring needs it's own handle to be added to the system. This code
- // does not understand the sub string. Thats the device drivers job.
- //
- Count = 0;
- while (*StartString != '\0') {
-
- //
- // Find the end of the sub string
- //
- SubString = StartString;
- while (*SubString != '\0' && *SubString != '!') {
- SubString++;
- }
-
- if (*SubString == '!') {
- //
- // Replace token with '\0' to make sub strings. If this is the end
- // of the string SubString will already point to NULL.
- //
- *SubString = '\0';
- SubString++;
- }
-
- CreateDevice = TRUE;
- if (RemainingDevicePath != NULL) {
- CreateDevice = FALSE;
- //
- // Check if RemainingDevicePath is the End of Device Path Node,
- // if yes, don't create any child device
- //
- if (!IsDevicePathEnd (RemainingDevicePath)) {
- //
- // If RemainingDevicePath isn't the End of Device Path Node,
- // check its validation
- //
- Node = (WIN_NT_VENDOR_DEVICE_PATH_NODE *) RemainingDevicePath;
- if (Node->VendorDevicePath.Header.Type == HARDWARE_DEVICE_PATH &&
- Node->VendorDevicePath.Header.SubType == HW_VENDOR_DP &&
- DevicePathNodeLength (&Node->VendorDevicePath.Header) == sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE)
- ) {
- if (CompareGuid (&Node->VendorDevicePath.Guid, mPcdEnvironment[Index].DevicePathGuid) &&
- Node->Instance == Count
- ) {
- CreateDevice = TRUE;
- }
- }
- }
- }
-
- if (CreateDevice) {
-
- //
- // Allocate instance structure, and fill in parent information.
- //
- WinNtDevice = AllocateMemory (sizeof (WIN_NT_IO_DEVICE));
- if (WinNtDevice == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- WinNtDevice->Handle = NULL;
- WinNtDevice->ControllerHandle = ControllerHandle;
- WinNtDevice->ParentDevicePath = ParentDevicePath;
-
- WinNtDevice->WinNtIo.WinNtThunk = WinNtThunk;
-
- //
- // Plus 2 to account for the NULL at the end of the Unicode string
- //
- StringSize = (UINTN) ((UINT8 *) SubString - (UINT8 *) StartString) + sizeof (CHAR16);
- WinNtDevice->WinNtIo.EnvString = AllocateMemory (StringSize);
- if (WinNtDevice->WinNtIo.EnvString != NULL) {
- CopyMem (WinNtDevice->WinNtIo.EnvString, StartString, StringSize);
- }
-
- WinNtDevice->ControllerNameTable = NULL;
-
- WinNtThunk->SPrintf (ComponentName, sizeof (ComponentName), L"%s", WinNtDevice->WinNtIo.EnvString);
-
- WinNtDevice->DevicePath = WinNtBusCreateDevicePath (
- ParentDevicePath,
- mPcdEnvironment[Index].DevicePathGuid,
- Count
- );
- if (WinNtDevice->DevicePath == NULL) {
- FreePool (WinNtDevice);
- return EFI_OUT_OF_RESOURCES;
- }
-
- AddUnicodeString2 (
- "eng",
- gWinNtBusDriverComponentName.SupportedLanguages,
- &WinNtDevice->ControllerNameTable,
- ComponentName,
- TRUE
- );
- AddUnicodeString2 (
- "en",
- gWinNtBusDriverComponentName2.SupportedLanguages,
- &WinNtDevice->ControllerNameTable,
- ComponentName,
- FALSE
- );
-
-
- WinNtDevice->WinNtIo.TypeGuid = mPcdEnvironment[Index].DevicePathGuid;
- WinNtDevice->WinNtIo.InstanceNumber = Count;
-
- WinNtDevice->Signature = WIN_NT_IO_DEVICE_SIGNATURE;
-
- Status = gBS->InstallMultipleProtocolInterfaces (
- &WinNtDevice->Handle,
- &gEfiDevicePathProtocolGuid,
- WinNtDevice->DevicePath,
- &gEfiWinNtIoProtocolGuid,
- &WinNtDevice->WinNtIo,
- NULL
- );
- if (EFI_ERROR (Status)) {
- FreeUnicodeStringTable (WinNtDevice->ControllerNameTable);
- FreePool (WinNtDevice);
- } else {
- //
- // Open For Child Device
- //
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiWinNtThunkProtocolGuid,
- (VOID **) &WinNtThunk,
- This->DriverBindingHandle,
- WinNtDevice->Handle,
- EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
- );
- }
- }
-
- //
- // Parse Next sub string. This will point to '\0' if we are at the end.
- //
- Count++;
- StartString = SubString;
- }
-
- FreePool (TempStr);
- }
-
- return EFI_SUCCESS;
-}
-
-
-EFI_STATUS
-EFIAPI
-WinNtBusDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- )
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
- None
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: ControllerHandle - add argument and description to function comment
-// TODO: NumberOfChildren - add argument and description to function comment
-// TODO: ChildHandleBuffer - add argument and description to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-// TODO: EFI_DEVICE_ERROR - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-{
- EFI_STATUS Status;
- UINTN Index;
- BOOLEAN AllChildrenStopped;
- EFI_WIN_NT_IO_PROTOCOL *WinNtIo;
- WIN_NT_BUS_DEVICE *WinNtBusDevice;
- WIN_NT_IO_DEVICE *WinNtDevice;
- EFI_WIN_NT_THUNK_PROTOCOL *WinNtThunk;
-
- //
- // Complete all outstanding transactions to Controller.
- // Don't allow any new transaction to Controller to be started.
- //
-
- if (NumberOfChildren == 0) {
- //
- // Close the bus driver
- //
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gWinNtBusDriverGuid,
- (VOID **) &WinNtBusDevice,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- gBS->UninstallMultipleProtocolInterfaces (
- ControllerHandle,
- &gWinNtBusDriverGuid,
- WinNtBusDevice,
- NULL
- );
-
- FreeUnicodeStringTable (WinNtBusDevice->ControllerNameTable);
-
- FreePool (WinNtBusDevice);
-
- gBS->CloseProtocol (
- ControllerHandle,
- &gEfiWinNtThunkProtocolGuid,
- This->DriverBindingHandle,
- ControllerHandle
- );
-
- gBS->CloseProtocol (
- ControllerHandle,
- &gEfiDevicePathProtocolGuid,
- This->DriverBindingHandle,
- ControllerHandle
- );
- return EFI_SUCCESS;
- }
-
- AllChildrenStopped = TRUE;
-
- for (Index = 0; Index < NumberOfChildren; Index++) {
-
- Status = gBS->OpenProtocol (
- ChildHandleBuffer[Index],
- &gEfiWinNtIoProtocolGuid,
- (VOID **) &WinNtIo,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (!EFI_ERROR (Status)) {
-
- WinNtDevice = WIN_NT_IO_DEVICE_FROM_THIS (WinNtIo);
-
- Status = gBS->CloseProtocol (
- ControllerHandle,
- &gEfiWinNtThunkProtocolGuid,
- This->DriverBindingHandle,
- WinNtDevice->Handle
- );
-
- Status = gBS->UninstallMultipleProtocolInterfaces (
- WinNtDevice->Handle,
- &gEfiDevicePathProtocolGuid,
- WinNtDevice->DevicePath,
- &gEfiWinNtIoProtocolGuid,
- &WinNtDevice->WinNtIo,
- NULL
- );
-
- if (EFI_ERROR (Status)) {
- gBS->OpenProtocol (
- ControllerHandle,
- &gEfiWinNtThunkProtocolGuid,
- (VOID **) &WinNtThunk,
- This->DriverBindingHandle,
- WinNtDevice->Handle,
- EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
- );
- } else {
- //
- // Close the child handle
- //
- FreeUnicodeStringTable (WinNtDevice->ControllerNameTable);
- FreePool (WinNtDevice);
- }
- }
-
- if (EFI_ERROR (Status)) {
- AllChildrenStopped = FALSE;
- }
- }
-
- if (!AllChildrenStopped) {
- return EFI_DEVICE_ERROR;
- }
-
- return EFI_SUCCESS;
-}
-
-EFI_DEVICE_PATH_PROTOCOL *
-WinNtBusCreateDevicePath (
- IN EFI_DEVICE_PATH_PROTOCOL *RootDevicePath,
- IN EFI_GUID *Guid,
- IN UINT16 InstanceNumber
- )
-/*++
-
-Routine Description:
- Create a device path node using Guid and InstanceNumber and append it to
- the passed in RootDevicePath
-
-Arguments:
- RootDevicePath - Root of the device path to return.
-
- Guid - GUID to use in vendor device path node.
-
- InstanceNumber - Instance number to use in the vendor device path. This
- argument is needed to make sure each device path is unique.
-
-Returns:
-
- EFI_DEVICE_PATH_PROTOCOL
-
---*/
-{
- WIN_NT_VENDOR_DEVICE_PATH_NODE DevicePath;
-
- DevicePath.VendorDevicePath.Header.Type = HARDWARE_DEVICE_PATH;
- DevicePath.VendorDevicePath.Header.SubType = HW_VENDOR_DP;
- SetDevicePathNodeLength (&DevicePath.VendorDevicePath.Header, sizeof (WIN_NT_VENDOR_DEVICE_PATH_NODE));
-
- //
- // The GUID defines the Class
- //
- CopyMem (&DevicePath.VendorDevicePath.Guid, Guid, sizeof (EFI_GUID));
-
- //
- // Add an instance number so we can make sure there are no Device Path
- // duplication.
- //
- DevicePath.Instance = InstanceNumber;
-
- return AppendDevicePathNode (
- RootDevicePath,
- (EFI_DEVICE_PATH_PROTOCOL *) &DevicePath
- );
-}
diff --git a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.h b/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.h deleted file mode 100644 index dac61a6..0000000 --- a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.h +++ /dev/null @@ -1,317 +0,0 @@ -/**@file
-
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-Module Name:
-
- WinNtBusDriver.h
-
-Abstract:
-
-This following section documents the envirnoment variables for the Win NT
-build. These variables are used to define the (virtual) hardware
-configuration of the NT environment
-
-A ! can be used to seperate multiple instances in a variable. Each
-instance represents a seperate hardware device.
-
-EFI_WIN_NT_PHYSICAL_DISKS - maps to drives on your system
-EFI_WIN_NT_VIRTUAL_DISKS - maps to a device emulated by a file
-EFI_WIN_NT_FILE_SYSTEM - mouts a directory as a file system
-EFI_WIN_NT_CONSOLE - make a logical comand line window (only one!)
-EFI_WIN_NT_GOP - Builds GOP Windows of Width and Height
-EFI_WIN_NT_SERIAL_PORT - maps physical serial ports
-EFI_WIN_NT_PASS_THRU - associates a device with our PCI support
-
- <F>ixed - Fixed disk like a hard drive.
- <R>emovable - Removable media like a floppy or CD-ROM.
- Read <O>nly - Write protected device.
- Read <W>rite - Read write device.
- <block count> - Decimal number of blocks a device supports.
- <block size> - Decimal number of bytes per block.
-
- NT envirnonment variable contents. '<' and '>' are not part of the variable,
- they are just used to make this help more readable. There should be no
- spaces between the ';'. Extra spaces will break the variable. A '!' is
- used to seperate multiple devices in a variable.
-
- EFI_WIN_NT_VIRTUAL_DISKS =
- <F | R><O | W>;<block count>;<block size>[!...]
-
- EFI_WIN_NT_PHYSICAL_DISKS =
- <drive letter>:<F | R><O | W>;<block count>;<block size>[!...]
-
- Virtual Disks: These devices use a file to emulate a hard disk or removable
- media device.
-
- Thus a 20 MB emulated hard drive would look like:
- EFI_WIN_NT_VIRTUAL_DISKS=FW;40960;512
-
- A 1.44MB emulated floppy with a block size of 1024 would look like:
- EFI_WIN_NT_VIRTUAL_DISKS=RW;1440;1024
-
- Physical Disks: These devices use NT to open a real device in your system
-
- Thus a 120 MB floppy would look like:
- EFI_WIN_NT_PHYSICAL_DISKS=B:RW;245760;512
-
- Thus a standard CD-ROM floppy would look like:
- EFI_WIN_NT_PHYSICAL_DISKS=Z:RO;307200;2048
-
- EFI_WIN_NT_FILE_SYSTEM =
- <directory path>[!...]
-
- Mounting the two directories C:\FOO and C:\BAR would look like:
- EFI_WIN_NT_FILE_SYSTEM=c:\foo!c:\bar
-
- EFI_WIN_NT_CONSOLE =
- <window title>
-
- Declaring a text console window with the title "My EFI Console" woild look like:
- EFI_WIN_NT_CONSOLE=My EFI Console
-
- EFI_WIN_NT_GOP =
- <width> <height>[!...]
-
- Declaring a two GOP windows with resolutions of 800x600 and 1024x768 would look like:
- Example : EFI_WIN_NT_GOP=800 600!1024 768
-
- EFI_WIN_NT_SERIAL_PORT =
- <port name>[!...]
-
- Declaring two serial ports on COM1 and COM2 would look like:
- Example : EFI_WIN_NT_SERIAL_PORT=COM1!COM2
-
- EFI_WIN_NT_PASS_THROUGH =
- <BaseAddress>;<Bus#>;<Device#>;<Function#>
-
- Declaring a base address of 0xE0000000 (used for PCI Express devices)
- and having NT32 talk to a device located at bus 0, device 1, function 0:
- Example : EFI_WIN_NT_PASS_THROUGH=E000000;0;1;0
-
----*/
-
-#ifndef __NT_BUS_DRIVER_H__
-#define __NT_BUS_DRIVER_H__
-
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-#include <WinNtDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/WinNtIo.h>
-#include <Protocol/ComponentName.h>
-#include <Protocol/WinNtThunk.h>
-#include <Protocol/DriverBinding.h>
-#include <Protocol/DevicePath.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
-
-//
-// WinNt Bus Driver Global Variables
-//
-extern EFI_DRIVER_BINDING_PROTOCOL gWinNtBusDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gWinNtBusDriverComponentName;
-extern EFI_COMPONENT_NAME2_PROTOCOL gWinNtBusDriverComponentName2;
-
-//
-// WinNt Bus Controller Structure
-//
-#define WIN_NT_BUS_DEVICE_SIGNATURE SIGNATURE_32 ('N', 'T', 'B', 'D')
-
-typedef struct {
- UINT64 Signature;
- EFI_UNICODE_STRING_TABLE *ControllerNameTable;
-} WIN_NT_BUS_DEVICE;
-
-//
-// WinNt Child Device Controller Structure
-//
-#define WIN_NT_IO_DEVICE_SIGNATURE SIGNATURE_32 ('N', 'T', 'V', 'D')
-
-typedef struct {
- UINT64 Signature;
- EFI_HANDLE Handle;
- EFI_WIN_NT_IO_PROTOCOL WinNtIo;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
-
- //
- // Private data about the parent
- //
- EFI_HANDLE ControllerHandle;
- EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
-
- EFI_UNICODE_STRING_TABLE *ControllerNameTable;
-
-} WIN_NT_IO_DEVICE;
-
-#define WIN_NT_IO_DEVICE_FROM_THIS(a) \
- CR(a, WIN_NT_IO_DEVICE, WinNtIo, WIN_NT_IO_DEVICE_SIGNATURE)
-
-//
-// This is the largest env variable we can parse
-//
-#define MAX_NT_ENVIRNMENT_VARIABLE_LENGTH 512
-
-typedef struct {
- UINTN Token;
- EFI_GUID *DevicePathGuid;
-} NT_PCD_ENTRY;
-
-typedef struct {
- VENDOR_DEVICE_PATH VendorDevicePath;
- UINT32 Instance;
-} WIN_NT_VENDOR_DEVICE_PATH_NODE;
-
-EFI_STATUS
-EFIAPI
-CpuIoInitialize (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- ImageHandle - TODO: add argument description
- SystemTable - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
-**/
-;
-
-//
-// Driver Binding Protocol function prototypes
-//
-EFI_STATUS
-EFIAPI
-WinNtBusDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Handle - TODO: add argument description
- RemainingDevicePath - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-WinNtBusDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ParentHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- ParentHandle - TODO: add argument description
- RemainingDevicePath - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-EFI_STATUS
-EFIAPI
-WinNtBusDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Handle - TODO: add argument description
- NumberOfChildren - TODO: add argument description
- ChildHandleBuffer - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-//
-// WinNt Bus Driver private worker functions
-//
-EFI_DEVICE_PATH_PROTOCOL *
-WinNtBusCreateDevicePath (
- IN EFI_DEVICE_PATH_PROTOCOL *RootDevicePath,
- IN EFI_GUID *Guid,
- IN UINT16 InstanceNumber
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- RootDevicePath - TODO: add argument description
- Guid - TODO: add argument description
- InstanceNumber - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-
-#endif
diff --git a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriverDxe.inf b/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriverDxe.inf deleted file mode 100644 index a39ee30..0000000 --- a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriverDxe.inf +++ /dev/null @@ -1,80 +0,0 @@ -## @file
-# Win NT Bus driver
-#
-# This following section documents the envirnoment variables for the Win NT
-# build. These variables are used to define the (virtual) hardware
-# configuration of the NT environment
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = WinNtBusDriverDxe
- FILE_GUID = BD7E9A27-D6C5-416a-B245-5F507D95B2BD
- MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.0
-
- ENTRY_POINT = InitializeWinNtBusDriver
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32
-#
-# DRIVER_BINDING = gWinNtBusDriverBinding
-# COMPONENT_NAME = gWinNtBusDriverComponentName
-#
-
-[Sources]
- ComponentName.c
- WinNtBusDriver.c
- WinNtBusDriver.h
-
-
-[Packages]
- MdePkg/MdePkg.dec
- Nt32Pkg/Nt32Pkg.dec
-
-
-[LibraryClasses]
- MemoryAllocationLib
- DevicePathLib
- UefiBootServicesTableLib
- BaseMemoryLib
- PcdLib
- UefiLib
- UefiDriverEntryPoint
- BaseLib
- DebugLib
-
-
-[Guids]
- gEfiWinNtConsoleGuid # ALWAYS_CONSUMED
- gEfiWinNtGopGuid # ALWAYS_CONSUMED
- gEfiWinNtSerialPortGuid # ALWAYS_CONSUMED
- gEfiWinNtFileSystemGuid # ALWAYS_CONSUMED
- gEfiWinNtPhysicalDisksGuid # ALWAYS_CONSUMED
- gEfiWinNtVirtualDisksGuid # ALWAYS_CONSUMED
-
-
-[Protocols]
- gWinNtBusDriverGuid # PROTOCOL BY_START
- gEfiDevicePathProtocolGuid # PROTOCOL BY_START
- gEfiWinNtThunkProtocolGuid # PROTOCOL TO_START
- gEfiWinNtIoProtocolGuid # PROTOCOL BY_START
-
-
-[Pcd]
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySize
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtPhysicalDisk
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtVirtualDisk
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtFileSystem
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtSerialPort
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtGop
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtUga
- gEfiNt32PkgTokenSpaceGuid.PcdWinNtConsole
-
|