[pso] [Tema2][Windows] modul solutie.sys

Andrei Voinescu voinescu.andrei at gmail.com
Fri Apr 23 18:47:05 EEST 2010


2010/4/23 Marius Poke <mariusp55 at yahoo.com>:
> Pai am urmatoarea problema acum, daca testez asa:
>
> DoWriteRegistry(OPTION_SENDER_ONLY);
> fatal_test(system("driver load objchk_wnet_x86\\i386\\uart16550.sys") == 0,
> "driver load objchk_wnet_x86\\i386\\uart16550.sys");
> DoWriteRegistry(OPTION_RECEIVER_ONLY);
> fatal_test(system("driver load _test\\solutie.sys") == 0, "driver load
> _test\\solutie.sys");
> fatal_test( system("driver unload uart16550") == 0, "driver unload
> uart16550");
> fatal_test( system("driver unload solutie") == 0, "driver unload solutie");
>
> Imi trece toate 4 teste oki.
> In schimb daca fac asa:
>
> DoWriteRegistry(OPTION_RECEIVER_ONLY);
> fatal_test(system("driver load objchk_wnet_x86\\i386\\uart16550.sys") == 0,
> "driver load objchk_wnet_x86\\i386\\uart16550.sys");
> DoWriteRegistry(OPTION_SENDER_ONLY);
> fatal_test(system("driver load _test\\solutie.sys") == 0, "driver load
> _test\\solutie.sys");
> fatal_test( system("driver unload uart16550") == 0, "driver unload
> uart16550");
> fatal_test( system("driver unload solutie") == 0, "driver unload solutie");
>
> Imi da urmatoarea eroare:
> ==== Module insertion and port&interrupt registration ============
> test 0001: driver load objchk_wnet_x86\i386\uart16550.sys...passed
> can't start service: Cannot create a file when that file already exists.
>
> test 0002: driver load _test\solutie.sys....................failed
>
> De asta intrebam cum sunt folosite acele optiuni. Modulul meu cand primeste
> optiunea OPTION_RECEIVER_ONLY deschide portul serial COM1 cu linkName-ul
> \\.\uart0. Modulul solutie.sys cand primeste optiunea OPTION_SENDER_ONLY ce
> com deschide (ce linkname) ??

Pentru modulul soluție \\.\uart0 este COM1 și \\.\uart1 este COM2,
indiferent de opțiune; de altfel, așa era și pe Linux: /dev/uart0
corespundea major-ului rezervat pentru COM1, /dev/uart1 pentru COM2.

Andrei
>
> Marius
>
> ________________________________
> From: Andrei Voinescu <voinescu.andrei at gmail.com>
> To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
> Sent: Fri, April 23, 2010 6:26:02 PM
> Subject: Re: [pso] [Tema2][Windows] modul solutie.sys
>
> 2010/4/23 Marius Poke <mariusp55 at yahoo.com>:
>> Sunt doar puse invers sau optiunile de la modulul solutie.sys sunt
>> inversate? Mai exact in modulul solutie.sys cand e setata optiunea
>> OPTION_SENDER_ONLY=1=OPTION_COM1 se deschide portul cu linkName-ul
>> \\.\uart0
>> sau \\.\uart1?
> OPTION_SENDER și RECEIVER sunt doar nume, nu au legătura cu funcția,
> sunt văzute din perspectiva modulului vostru (dar din greșeală erau
> puse din perspectiva modulului solutie.
> Deci era optiunea sender_only pentru uart16550, care înseamnă 2 ->
> com2 -> /dev/uart1.
> Test-ul este cu scriere pe uart1 și citire pe uart0, deci modulul
> vostru trebuia să aibă funcție de scriere.
> Acum am pus option_receiver_only la calupul de teste "Reading at base
> speed", it should be ok.
>
> Andrei
>>
>> Marius
>> ________________________________
>> From: Andrei Voinescu <voinescu.andrei at gmail.com>
>> To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
>> Sent: Fri, April 23, 2010 6:11:36 PM
>> Subject: Re: [pso] [Tema2][Windows] modul solutie.sys
>>
>> Într-adevăr, se pare că pe Windows sunt puse pe dos...
>>
>> 2010/4/23 Marius Poke <mariusp55 at yahoo.com>:
>>> Doar de curiozitate, setul de teste ==== Reading at base speed (2400
>>> baud)
>>> ==== face read sau write de fapt?
>>> Intreb asta ca in acest set de teste solutie.sys e deschis cu optiunea
>>> OPTION_RECEIVER_ONLY = 1 = OPTION_COM1, deci va afea asociat \\.\uart0,
>>> care
>>> in functia test_group are asociat handlerul com2, handler cu care se face
>>> citirea. De asta nu scria modulul solutie.sys, de fapt nu scria modulul
>>> meu
>>> pt. ca nu are aceasta functionalitate inca :).
>>>
>>> Marius
>>>
>>>
>>> ________________________________
>>> From: Marius Poke <mariusp55 at yahoo.com>
>>> To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
>>> Sent: Fri, April 23, 2010 4:33:39 PM
>>> Subject: Re: [pso] [Tema2][Windows] modul solutie.sys
>>>
>>> Salut,
>>>
>>> In continuare aceeasi problema. Poate sa ma ajute careva. Mersi
>>>
>>> Marius
>>>
>>>
>>> ________________________________
>>> From: Marius Poke <mariusp55 at yahoo.com>
>>> To: PSO lista_discutii <pso at cursuri.cs.pub.ro>
>>> Sent: Fri, April 23, 2010 1:00:44 PM
>>> Subject: [pso] [Tema2][Windows] modul solutie.sys
>>>
>>> Salut,
>>>
>>> Am o problema cu modulul solutie.sys. Se blocheaza cand face write, mai
>>> exact in functia DoWriteFile din test:
>>> while (1) {
>>>         if (!WriteFile(fd, &buffer[from], size-from, &n, NULL))
>>>             return -1;
>>>         if (n+from == size)
>>>             return 0;
>>>         from+=n;
>>>         fprintf(stderr, "from %i \n", from);
>>>     }
>>>
>>> imi afiseaza mereu from 0.
>>> Functia este apelata pentru com1 la al doilea set de teste (com1 este
>>> modulul solutie.sys).
>>>
>>> Vreo idee?
>>>
>>> Mersi,
>>>     Marius
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> pso mailing list
>>> pso at cursuri.cs.pub.ro
>>> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>>>
>>>
>> _______________________________________________
>> pso mailing list
>> pso at cursuri.cs.pub.ro
>> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>>
>>
>> _______________________________________________
>> pso mailing list
>> pso at cursuri.cs.pub.ro
>> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>>
>>
> _______________________________________________
> pso mailing list
> pso at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>
>
> _______________________________________________
> pso mailing list
> pso at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>
>


More information about the pso mailing list