When NIC get involved in system startup and shutdown...?

Hi, everyone.

I’m recently working on a diskless PC project, which aims at booting Windows 2K/XP from a network server. The works, you known, are just write a boottrap according PXE standard, hook INT 13H, build a SCSI miniport driver lying on TDI, and so on.

So far, i can boot win2K from network, and the system runs well without any local storage, excpect when it comes to system shutdown or restart.

I found if i perform a large amout of, say 200M or more, I/Os on my virtual disk (C:) during system running, then it will hang up when i want to shutdown or restart the machine. After observing this phenomina for a considerable long time, i guess the most believable reason is that the NIC is shutdown before my virtual disk driver.

If i shutdown or restart machine right after system boot up, the machine can be shutdown or restarted normally. So i think that my virtual disk driver has no sufficient time to fully flush the data to remote server before NIC is shutdown.In normal PC that with harddisk in box, the NIC is inrelative to system startup and shutdown, but now, i’m highly depend on it. so, i must find some way to modify windows behavior.

Can i solve this problem by writing a NDIS intermediate driver and intercepting the Power Management IRP sent to the NIC driver? or, am i getting the right point about this problem?

Thanks.

WeiYu, Dong


ÑÅ»¢Ãâ·ÑGÓÊÏ䣭No.1µÄ·À¶¾·ÀÀ¬»ø³¬´óÓÊÏä
ÑÅ»¢ÖúÊÖ¡§DËÑË÷¡¢É±¶¾¡¢·ÀɧÈÅ

>I’m recently working on a diskless PC project, which aims at booting
Windows 2K/XP

from a network server. The works, you known, are just write a boottrap
according
PXE standard, hook INT 13H, build a SCSI miniport driver lying on TDI, and
so on.

My understanding is the network stack is not functional at the time a
storage stack needs to mount the system disk. It sounds like you maybe
mucked with the normal driver start order?

I found if i perform a large amout of, say 200M or more, I/Os on my virtual
disk (C:) during system running, then it will hang >up when i want to
shutdown or restart the machine. After observing this phenomina for a
considerable long time, i guess the >most believable reason is that the
NIC?is shutdown before my virtual disk driver.

A storage stack will get a shutdown notification, AFTER almost everything
else, as it needs to keep functioning while the file system drivers flush
buffers,and mark the volume as clean. A serious problem is EVERYTHING that
might be touched for doing paging I/O must be page locked. You basically
can’t be touching paged code or data, that might be paged out on the volume
that is being unmounted (i.e. the system disk).
?

Can i solve this problem by writing a NDIS intermediate driver and
intercepting the Power Management IRP sent to the NIC >driver? or, am i
getting the right point about this problem?

This doesn’t help the above issue. My understanding is the only viable
strategy for a diskless system would be write a SCSI miniport that had its
own internal protocol stack (i.e. TCP/IP) and knew how to directly control a
network card.

  • Jan