Re: Modifying stack

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Pavel A. (pavel_a_at_geeklife.com)
Date: 02/20/04


Date: Fri, 20 Feb 2004 05:48:37 +0200


"Mahboobul Alem" <mahboobulalem@yahoo.com> wrote in message news:51226FEA-D55A-450A-8711-A54CEEB74881@microsoft.com...
> Question 1:
> We have a NDIS Miniport driver (Win2K) that uses ADSL and ATM stack that are part of it. ADSL/ATM stack require huge
stack size. Receive frame processing requires about 16K stack and transmit processing requires 48 K stack.
>
> The Win2000 driver modifies the ebp & esp before calling ADSL/ATM stack and restores it. This seems to work fine.
However, when we use XP DDK or Server 2003 DDK to build the driver, we get an error for changing the esp/ebp value.
> Is there a way to control the stack size in the driver and driver's ISR (as well as DPC) other than this brute force,
which I assume is not "kosher"?

Not because it is "kosher", but because it just contradicts the common sense.
Why to allocate data this big on kernel stack when you have the pool.
[ kernel is such a special place in the OS, where brute force can do very little without a brain... pardon me ]

> Question 2:
> We use MMA instructions. therefore we use _asm{..} code to save and restore floating point state. However, it looks
like we could use EngSaveFloatingPointState/EngRestoreFloatingPointState. Is there any restriction on if NDIS drivers
can use these functions?

For NDIS, use KeSaveFloatingPointState. Eng... functions are only for video.

Regards,
-- PA



Relevant Pages

  • Re: NDIS protocol driver and BDA
    ... The components that you referred to used to recieve the stream off the air and then inject part of it into IP stack. ... You can implement everything in user mode, including bda filters and winsock application. ... Our solution is based on bda/ks driver and ndis virtual miniport. ...
    (microsoft.public.development.device.drivers)
  • Re: NDIS protocol driver and BDA
    ... injecting broadcast traffic into IP stack? ... I have an ethernet device sending me DVB data. ... Is there any approach possible to implement a kernel BDA driver ... Since both NDIS and BDA/KS are miniport frameworks you can not mix them ...
    (microsoft.public.development.device.drivers)
  • Re: [PATCH 0/3] New firewire stack
    ... My main point about ohci1394 (the old stacks PCI driver) is, ... The big problems in the ohci1394 drivers is the irq_handler, bus reset ... reset, so there is no need to complicate the core stack with this extra state, ... interfaces have slightly disjoint feature sets and can't really be phased out. ...
    (Linux-Kernel)
  • Re: [PATCH 0/3] New firewire stack
    ... My main point about ohci1394 (the old stacks PCI driver) is, ... The big problems in the ohci1394 drivers is the irq_handler, bus reset ... reset, so there is no need to complicate the core stack with this extra state, ... interfaces have slightly disjoint feature sets and can't really be phased out. ...
    (Linux-Kernel)
  • [crash] BUG: unable to handle kernel NULL pointer dereference at (null), last sysfs file: /sys/devic
    ... Stack: ... Call Trace: ... # SCSI device support ... # You can enable one or both FireWire driver stacks. ...
    (Linux-Kernel)