Problems using .kdfiles to replace boot time drivers

I recently discovered the article on the OSR web page indicating that
replacement of boot time drivers is indeed possible and then found the text
in the new windbg help indicating how to do this - however, I’m still having
problems getting it to work - wondering if anyone has any suggestions.

The problem I am getting is that the replacement fails part way through
downloading the new driver; for example:

KD: Accessing ‘c:\testsymbols\sraio.sys’ (\WINNT\system32\DRIVERS\sraio.sys)
File size
51K…

…BdPullRemoteFile: BdReadRemoteFile
failed! (c000000d)

I also get c00000011 (end of file). I know this file is OK because I have
since copied it manually to the target and it loads/runs just fine.

/simgr

What OS is this happening with, and what version of the debugger?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Graham, Simon
Sent: Thursday, May 22, 2003 9:42 AM
To: Kernel Debugging Interest List
Subject: [windbg] Problems using .kdfiles to replace boot time drivers

I recently discovered the article on the OSR web page indicating that
replacement of boot time drivers is indeed possible and then found the
text in the new windbg help indicating how to do this - however, I’m
still having problems getting it to work - wondering if anyone has any
suggestions.

The problem I am getting is that the replacement fails part way through
downloading the new driver; for example:

KD: Accessing ‘c:\testsymbols\sraio.sys’
(\WINNT\system32\DRIVERS\sraio.sys)
File size
51K…



…BdPullRemoteFile:
BdReadRemoteFile failed! (c000000d)

I also get c00000011 (end of file). I know this file is OK because I
have since copied it manually to the target and it loads/runs just fine.

/simgr


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

There is a bug in some versions of the BIOS for some Intel chipsets
which causes disruption of the serial communication early in boot.
Turning off “Legacy USB” in the BIOS causes the buggy code not to
execute and therefore not have the problem.

Legacy USB is only needed to support USB keyboards.

Word is that Intel fixed this issue a year or two ago so brand new
machines shouldn’t have this issue.

When I worked on the debugger disabling legacy USB resolved a huge
percent (something like 90%+) of the debugger can’t connect on boot
issues we were seeing on campus.

That is my understanding anyway.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Graham, Simon
Sent: Tuesday, May 27, 2003 5:23 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Problems using .kdfiles to replace boot time dri
vers

I am fairly sure that the serial connection is good - I’ve been using
this configuration for ~ a year with no communication problems. I have
not tried .kdfiles with any other drivers – the ones I am interested in
debugging are all boot time hence my excitement at finding a way of
doing this (although it is painfully slow even at 115KB).

I’m interested in your comment about disabling legacy USB –
unfortunately this is not possible since the system only has USB for
kb/mouse. Can you elaborate as to why this might be a problem?

/simgr

-----Original Message-----
From: David Holcomb [mailto:xxxxx@microsoft.com]
Sent: Monday, May 26, 2003 10:23 PM
To: Kernel Debugging Interest List

Our developer suggests you try to verify your serial connection is 100%
reliable and legacy USB support is disabled in your BIOS.

I am curious if this only happens in the very special case of your boot
driver. Otherwise do you have any problems with debugging this target
in kernel mode? Or have you tried .kdfiles with any other driver
(non-boot driver or other boot driver)?

You also might want to see if it repros on another machine with your
same boot driver loaded. If it repros on another machine too (hopefully
different hardware and also with legacy USB support disabled), it would
seem more likely that there is a problem with the special boot loader or
the debugger.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Graham, Simon
Sent: Thursday, May 22, 2003 10:40 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Problems using .kdfiles to replace boot time dri
vers

Sorry - should have included that;
. 3790 on the target
. XP-SP1 on the windbg host
. windbg 6.2.7.4.
. The debug version of the NTLDR I am using is from the 3790 DDK.

/simgr

-----Original Message-----
From: David Holcomb [mailto:xxxxx@microsoft.com]
Sent: Thursday, May 22, 2003 1:31 PM
To: Kernel Debugging Interest List

What OS is this happening with, and what version of the debugger?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Graham, Simon
Sent: Thursday, May 22, 2003 9:42 AM
To: Kernel Debugging Interest List
Subject: [windbg] Problems using .kdfiles to replace boot time drivers

I recently discovered the article on the OSR web page indicating that
replacement of boot time drivers is indeed possible and then found the
text in the new windbg help indicating how to do this - however, I’m
still having problems getting it to work - wondering if anyone has any
suggestions.

The problem I am getting is that the replacement fails part way through
downloading the new driver; for example:

KD: Accessing ‘c:\testsymbols\sraio.sys’
(\WINNT\system32\DRIVERS\sraio.sys)
File size
51K…



…BdPullRemoteFile:
BdReadRemoteFile failed! (c000000d)

I also get c00000011 (end of file). I know this file is OK because I
have since copied it manually to the target and it loads/runs just fine.

/simgr


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Simon, you mentioned you found out about how to debug boot drivers on
the OSR web site. I wonder which page you found the info on?

FYI, the ability to debug boot loader drivers is now documented in the
debugger.chm. See the section titled “Mapping Driver Files” under
“Debugger Operation\Debugger Operation (Kernel Mode)”, or just do a
search on ntldr. I think that section might have been added in 6.2.7.4.
Note if you choose to use the special boot loader, you can’t do 1394
debugging (for others who may be wondering). It only works over serial,
COM1 on target, 115200. Also, the docs refer to %DDKROOT%\tools\debug
as the directory where to find the special loader, but it is just
%DDKROOT%\debug.

To reinforce what Nathan said, if your BIOS exposes a “Legacy USB”
setting, it sends a interrupt often enough that it actually disrupts
serial communication (bytes get lost). Since you say you’ve had
reliable serial communication on this machine in the past with the
kernel debugger, I don’t think the problem is necessarily with the
debugger itself. It could actually be an issue with the special boot
loader. But it wouldn’t hurt to check the BIOS for such a setting, just
in case. It may be that the use of the special boot loader exacerbates
the problem with serial communication.

If you send the Ctrl+D output when the .kdfiles transfer fails, we might
be able to figure out if there are other possible reasons. But it would
help if you could confirm the BIOS has no such setting. Maybe you
should let us know more details about the specific motherboard and BIOS
version too.

We need to narrow down if this problem is specific to your one machine,
only machines with your motherboard and BIOS, or all machines. Also we
need to narrow down if it is just this OSes special NTLDR, or does it
happen with XP too? And Lastly does it happen with just this debugger,
or also with previous debugger releases?

I can almost guarantee you that if your machine has a Legacy USB setting
(it might be called USB emulation or something), that will be the core
of the problem. In every case I’ve ever seen where a Legacy USB option
was available, disabling it fixed all serial communication problems.
Who knows, there could even be a jumper on your motherboard or something
to disable it (I’m only guessing, I’ve never heard of a case where a
jumper was involved.)

-----Original Message-----
From: Nathan Nesbit
Sent: Tuesday, May 27, 2003 9:11 AM
To: Kernel Debugging Interest List; David Holcomb
Subject: RE: [windbg] RE: Problems using .kdfiles to replace boot time
drivers

There is a bug in some versions of the BIOS for some Intel chipsets
which causes disruption of the serial communication early in boot.
Turning off “Legacy USB” in the BIOS causes the buggy code not to
execute and therefore not have the problem.

Legacy USB is only needed to support USB keyboards.

Word is that Intel fixed this issue a year or two ago so brand new
machines shouldn’t have this issue.

When I worked on the debugger disabling legacy USB resolved a huge
percent (something like 90%+) of the debugger can’t connect on boot
issues we were seeing on campus.

That is my understanding anyway.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Graham, Simon
Sent: Tuesday, May 27, 2003 5:23 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Problems using .kdfiles to replace boot time dri
vers

I am fairly sure that the serial connection is good - I’ve been using
this configuration for ~ a year with no communication problems. I have
not tried .kdfiles with any other drivers – the ones I am interested in
debugging are all boot time hence my excitement at finding a way of
doing this (although it is painfully slow even at 115KB).

I’m interested in your comment about disabling legacy USB –
unfortunately this is not possible since the system only has USB for
kb/mouse. Can you elaborate as to why this might be a problem?

/simgr

-----Original Message-----
From: David Holcomb [mailto:xxxxx@microsoft.com]
Sent: Monday, May 26, 2003 10:23 PM
To: Kernel Debugging Interest List

Our developer suggests you try to verify your serial connection is 100%
reliable and legacy USB support is disabled in your BIOS.

I am curious if this only happens in the very special case of your boot
driver. Otherwise do you have any problems with debugging this target
in kernel mode? Or have you tried .kdfiles with any other driver
(non-boot driver or other boot driver)?

You also might want to see if it repros on another machine with your
same boot driver loaded. If it repros on another machine too (hopefully
different hardware and also with legacy USB support disabled), it would
seem more likely that there is a problem with the special boot loader or
the debugger.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Graham, Simon
Sent: Thursday, May 22, 2003 10:40 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Problems using .kdfiles to replace boot time dri
vers

Sorry - should have included that;
. 3790 on the target
. XP-SP1 on the windbg host
. windbg 6.2.7.4.
. The debug version of the NTLDR I am using is from the 3790 DDK.

/simgr

-----Original Message-----
From: David Holcomb [mailto:xxxxx@microsoft.com]
Sent: Thursday, May 22, 2003 1:31 PM
To: Kernel Debugging Interest List

What OS is this happening with, and what version of the debugger?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Graham, Simon
Sent: Thursday, May 22, 2003 9:42 AM
To: Kernel Debugging Interest List
Subject: [windbg] Problems using .kdfiles to replace boot time drivers

I recently discovered the article on the OSR web page indicating that
replacement of boot time drivers is indeed possible and then found the
text in the new windbg help indicating how to do this - however, I’m
still having problems getting it to work - wondering if anyone has any
suggestions.

The problem I am getting is that the replacement fails part way through
downloading the new driver; for example:

KD: Accessing ‘c:\testsymbols\sraio.sys’
(\WINNT\system32\DRIVERS\sraio.sys)
File size
51K…



…BdPullRemoteFile:
BdReadRemoteFile failed! (c000000d)

I also get c00000011 (end of file). I know this file is OK because I
have since copied it manually to the target and it loads/runs just fine.

/simgr


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com