Wednesday, July 23, 2008

Boot Parameters to Manipulate Memory

Here we discuss about the memory options at the boot time for a pc.

You can simulate a low-memory environment for testing without changing the amount of physical memory on the computer. Instead, you can limit the memory available to the operating system by using the /burnmemory and /maxmem boot parameters in Windows Server 2003 and Windows XP, and by using truncatememory or removememory options with the BCDedit /set command on Windows Vista.
The /burnmemory parameter, which is available on Windows Server 2003 and Windows XP, reduces the memory available to Windows by the specified amount. It is calibrated in megabytes (MB). Set the value to any amount less than the actual physical memory on the computer.
The /maxmem parameter specifies the maximum amount of memory available to Windows. It is calibrated in megabytes (MB). Set the value to any amount less than the actual physical memory on the computer.
The /maxmem parameter actually determines the largest memory address available to Windows. Due to gaps in the mapping of physical memory, Windows might receive somewhat less memory than the value of /maxmem. For more precision, use /burnmemory.
The truncatememory or removememory options are available on Windows Vista. The truncatememory option disregards all memory at or above the specified physical address. The removememory option reduces memory available to Windows by the specified amount (measured in MB). Both options reduce memory, but the removememory option is better at restricting the operating system to use the specified memory while accounting for memory gaps.
Boot Parameters to Test in a Low-memory Environment in Operating Systems prior to Windows Vista
To simulate a low-memory environment on Windows Server 2003 and Windows XP, add the /burnmemory parameter to a boot entry. Set its value to the amount of physical memory on the system minus the desired memory size for this test.
For example, to limit the memory of a computer with 1 GB of physical memory to a maximum of 128 MB of available memory, set the value of the /burnmemory parameter to 896 (1 GB (1024 MB) - 128 MB = 896 MB).
The first boot entry in the following sample Boot.ini file has the /burnmemory parameter.
[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Low Memory" /fastdetect /burnmemory=896multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
To add the /burnmemory parameter to a boot entry, use Bootcfg. Because Bootcfg does not have a parameter-specific switch for /burnmemory, use the Bootcfg /raw switch, which allows you to specify any boot parameter for a boot entry.
In the following Bootcfg command, the /raw switch adds the content of the string, "/burnmemory=896" to a boot entry. The /A switch directs Bootcfg to append the string to the entry, rather than replacing all boot parameters for the entry. The /ID switch identifies the boot entry.
bootcfg /raw "/burnmemory=896" /A /ID 1
The following Bootcfg display shows the result of the command on a system with a Boot.ini file.
Boot Entries------------Boot entry ID: 1Friendly Name: "Microsoft Windows XP Professional"Path: multi(0)disk(0)rdisk(0)partition(1)\WINDOWSOS Load Options: /fastdetect /burnmemory=896
Boot Parameters to Test in a Low-memory Environment in Windows Vista
To simulate a low-memory environment on Windows Vista , use the BCDedit /set command and the removememory option to modify a boot entry. Set the value of removememory to the amount of physical memory on the system minus the desired memory size for this test.
For example, to limit the memory of a computer with 2 GB of physical memory to a maximum of 512 MB of available memory, set the value of the removememory parameter to 1536 (1 GB (2048 MB) - 512 MB = 1536 MB).
The following example shows a BCDEdit command used to remove 1536 MB of memory from the total available to the system for the specified boot entry.
bcdedit /set {18b123cd-2bf6-11db-bfae-00e018e2b8db} removememory 1536
You can also use the truncatememory option with the bcdedit /set command to achieve the same result. When you use this option, Windows ignores all memory at or above the specified physical address. Specify the address in bytes. For example, the following command sets the physical address limit at 1 GB for the specified boot entry. You can specify the address in decimal (1073741824) or hexadecimal (0x40000000).
bcdedit /set {18b123cd-2bf6-11db-bfae-00e018e2b8db} truncatememory Ox40000000
Because the removememory option makes more efficient use of system memory, its use is recommended instead of truncatememory.
Boot parameters to debug in a low-memory environment in operating systems prior to Windows Vista
To simulate a low-memory environment on Windows 2000, add the /maxmem parameter to a boot entry. Set its value to the desired memory size for the test.
The first boot entry in the following sample Boot.ini file includes the /maxmem parameter.
[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Low Memory" /fastdetect /maxmem=128multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
In this example, the /maxmem parameter is used to limit Windows to 128 MB of memory and the computer is configured for debugging with a debug (null modem) cable. This configuration requires two Bootcfg commands.
The first Bootcfg command uses the Bootcfg /addsw (add switch) switch with the /MM argument and a value of 128 to add the /maxmem parameter and to set it to a value of 128 (MB). The /ID switch identifies the boot entry.
bootcfg /addsw /MM 128 /ID 1
The second Bootcfg command uses the Bootcfg /debug switch with a value of ON to add the /debug parameter to the boot entry. It uses the /port switch with a value of COM1 to add the /debugport parameter and to set it to COM1, and it uses the /baud switch with a value of 19200 to add the /baudrate parameter and set it to 19,200 BPS. The /ID parameter identifies the boot entry.
bootcfg /debug ON /port COM1 /baud 19200 /ID 1
The following Bootcfg sample shows the resulting boot entry. The newly added parameters are displayed in bold type.
Boot Entries------------Boot entry ID: 1Friendly Name: "Windows XP 128MB Debug"Path: multi(0)disk(0)rdisk(0)partition(1)\WINDOWSOS Load Options: /fastdetect /maxmem=128 /debug /debugport=COM1 /baudrate=19200

Friday, July 18, 2008

DTM Step by step

Preparing for Unclassified Signature Testing




Before running the tests, you must configure at least one client system and install the operating system. This section summarizes the related procedures.


Device and Driver Installation

Install your driver and device on at least one client computer system.

DTM Client Software Installation

Install Device Test Manager (DTM) client software. After DTM client is installed, open DTM Studio and add the new client to a machine pool.

Create a Machine Pool

If a machine pool has not already been created, create one.

Right-click the ‘$’ in the left-hand Machine Pool window, and click Add Machine Pool.

In the Add Machine Pool dialog box, type a name for the machine pool, and click OK.

Right-click the new machine pool, click Properties, and click the MCU Policy tab.

In the Available dimensions area, click Wdk\ConfigureUnclassified, click Add, and then click OK.

Add the newly installed client to the machine pool by dragging and dropping it
from the Default Pool window to the newly created machine pool.
Make the client ready for scheduling

In the machine pool to which you added the newly installed client, right-click
The client computer in the Machines windows, click Change Status, then click Reset.

The Unclassified Master Config Job will automatically schedule and run on
The client computer. When the job has completed, the client is ready to
Begin an Unclassified submission.

Repeat the preceding step for each client in the machine pool.
/**************************************************************************************/


Running the Unclassified Signature Tests

To run the Unclassified Signature tests, do the following:
Open Driver Test Manager (DTM) Studio.

On the Explorers menu, click Device Console.

Select View By Submission.

From the Submission control, click New Submission. The Create New Submission Wizard appears.

From the OS Window, select the Windows operating system that is installed on
the client, and then click Next.

From the Select Category window, click Device Submission, and then click Next.
Under Logo Program, scroll to the bottom of the list, click Unclassified, and then click Next.

From the Qualification window, click Unclassified Signature, and then click Next.

Type a name for the submission, click the machine pool, and then click Next.

Type the path to the INF file and click Load. You can also use the
Browse button to find your INF file.

Under Drivers for Submission, select the driver that you want to
submit, and then click Next.

Note The No INF check box is not applicable to an Unclassified submission.
Click Finish.

The new submission appears on the left side of the Available Devices window
in the Device Console.

In Available Jobs, select the Driver Reliability check box,
and then expand the Driver Reliability category to show the individual jobs.

The Prefast for Drivers Test requires that you manually edit the
parameters for your driver. The following procedure assumes you have already run
Prefast for Drivers on your source code and created the results file (Defects.xml). The Prefast for Drivers test will import information from that file into your submission package.

For more information about this requirement, see Prefast for Drivers Test.
Right-click Prefast for Drivers, and click Edit Parameters.

Enter the path to the Prefast for Drivers results file as described
in the Prefast for Drivers test documentation. When the Prefast for Drivers parameters are complete, close the Parameters windows.

Note If your submission contains a kernel-mode device driver or
kernel-mode service, the Prefast for Drivers results file is required
for Logo or Unclassified Signature. Refer to the Windows Logo Program guide for more information about this requirement.

To schedule the Unclassified Submission jobs, do the following:
Click Add Selected, and then click Schedule Jobs.
Note At this point, you can return to the Job Monitor and observe job completion.
From the Device Console, click the Status button to launch the Submission Status Tool.

After the submission jobs are complete, create a submission package.
Open Device Console, and in the Available Devices window on the left,
right-click the submission name that you created earlier.

Click Create Submission Package.

In the Save File dialog box, type a name for the submission, and then click Save.
Important This is the file that you will submit to Microsoft along with your driver package.


/******************************************************************************/

Submitting Logo Test Results

The final step required to obtain a “Designed for Microsoft Windows” logo is to
submit your successful logo test results to Microsoft’s Windows Hardware Quality Labs (WHQL).

To create a package and submit your logo test results Right-click the main node in tree-view of the Device Console window and select Create Submission Package.

Select a location and name for the cabinet file that contains the results
of the successful logo tests.

Click Save to save the file.

Now download WinQual uploader tool from WHQL website to create the XML and Cab files.

Then Put a digital stamp on that using verisign technique.
You can goto my blog http://yera-raj.blogspot.com/2008_04_01_archive.html for verisign steps.


Go to the WHQL Web site and follow the instructions there to submit your package.

Note You can check on the status of your submission by logging back into the same website