Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

RE: How to configure a ISA hardware in the "LogConfig

Don_Burn_1Don_Burn_1 Member Posts: 4,311
You never address physical hardware with a pointer. You need to look at
the State device code of something like the WDM version of the PCIDRV
sample. Bottom line you do not manipulate either the physical address
or the interrupt directly, you use the mapped resources provided by the
state device request.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr




> -----Original Message-----
> From: xxxxx@gmail.com [mailto:xxxxx@gmail.com]
> Posted At: Thursday, March 18, 2010 1:06 PM
> Posted To: ntdev
> Conversation: How to configure a ISA hardware in the "LogConfig"
> Subject: How to configure a ISA hardware in the "LogConfig"
>
>
> The question continues.
>
> I have modify my ISA driver like a Pnp dirver according to some good
heart
> in this forum.
>
> Then , I make a ISA.inf file for my ISA.sys, and installed into the
XP. Then
> ,there is a new prolbem, The XP does gives the ISA card the memory
resource I
> configured in the ISA.inf.
>
> The hardware resource I set in the ISA.inf is like these:
>
> ConfigPriority=DESIRED
> MemConfig=d800-dB00 ; MK_FP(0xd800,0x0000);
> IRQconfig=11 ; 11=0Xb
>
>
> The following source code is a test program for this card runs under
the
> Windows 98, and I think the most crucial information is
>
> unsigned char far *v1=MK_FP(0xd800,0x0000);
>
> setvect(0x0b,addr);
>
>
> Both the Windows 98 and XP runs at the same PC .
>
>
> /*************************************************************/
>
> void interrupt load_image(void);
> void interrupt (*old)(void);
> void install(void interrupt(*addr)(void));
>
> unsigned char far *v1=MK_FP(0xd800,0x0000); static unsigned char
v2[512];
> static char flag = 0;
>
> int main(void)
> {
> FILE *fp = fopen("c:\\test.raw", "wb");
> int count = 1024;
> int loop = 0;
> flag = 0;
>
> old = getvect(0x0b);
> install(load_image);
>
> while(loop < count)
> {
>
> if(flag)
> {
> disable();
> /*install(old);*/
> fwrite(v2, sizeof(char), 512, fp);
> loop++;
> /*install(load_image);*/
> enable();
> /*printf("Loop = %d\n", loop);*/
> }
> }
>
> install(old);
>
> fclose(fp);
>
> }
>
>
>
>
> void interrupt load_image(void)
> {
> int x;
> flag = 0;
> disable();
>
> for(x=0;x<512;x++)
> {
> v2[x]=*(v1+x);
> }
>
> outportb(0x20,0x20);
> flag = 1;
> enable();
> }
>
>
>
>
>
> void install(void interrupt (*addr)())
> {
> disable();
> setvect(0x0b,addr);
> outportb(0x21,0);
> enable();
> }
>
>
> /*************************************************************/
>
>
>
>
>
>
> __________ Information from ESET Smart Security, version of virus
signature
> database 4955 (20100318) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Yes ,I have modify my source code like a PCI dirver .

    The problem now is when I installed my driver , I can see the resource was not assigned in the device manage.

    the fragment in my inf file:

    /************************************************/
    [Aicr.Files.Driver]
    isadriver.sys

    [Aicr.LogConfig]
    MemConfig=d800-dB00
    IRQconfig=3

    [Aicr.LogConfig0]
    ConfigPriority=DESIRED
    MemConfig=d800-dB00
    IRQconfig=11

    [Aicr.LogConfig1]
    ConfigPriority=NORMAL
    IOConfig=18c-18f;

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

    the device manage give me the IO reource 18c-18f , when I want reassign the d800-dB00, it seems that the address has been occupied
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,007
    xxxxx@gmail.com wrote:
    > Yes ,I have modify my source code like a PCI dirver .
    >
    > The problem now is when I installed my driver , I can see the resource was not assigned in the device manage.
    >
    > the fragment in my inf file:
    >
    > /************************************************/
    > [Aicr.Files.Driver]
    > isadriver.sys
    >
    > [Aicr.LogConfig]
    > MemConfig=d800-dB00
    > IRQconfig=3
    >
    > [Aicr.LogConfig0]
    > ConfigPriority=DESIRED
    > MemConfig=d800-dB00
    > IRQconfig=11
    >

    That's still not enough zeros. You need three zeros.
    MemConfig= D8000-DB000

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA