Re: how can i disble irq15 through C/assembly programming.

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



In advance...

"anton bassov" <soviet_bloke@xxxxxxxxxxx> wrote in message
news:1169736227.676053.32450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Arkady,


Multiprocessor machines exist already many years ( Seymour Cray built his
first multiprocessor supercomputer before 25 years ) and still it remain
big
problem of s/w , so what....

Well, these machines do not run Windows, do they? Therefore, they are
unrelated to our discussion. Once we speak about 32-bit Windows, let's
stick to x86 platform, if you don't mind...

Really ? Windows NT ( win32 ), that was born before windows 95 in 1993 , was
ready to run on absolutely different processors : Alpha of DEC,
Power PC of IBM, MIPSand Intel's x86. Still you can find alpha's structs in
winnt.h.
Win32 of Windows CE run on Power PC (once ) , MIPS,different ARM clones not
only Intel's ( StrongARM, xScale of Intel , OMAP of TI and many others ),
SH3/SH4 of Sharp and obviously x86. Each one of those have absolutely
different archtecture and even for for x86 drivers are user mode dlls.


cli/sti worked nice for me ( with PIC/APIC ) even in user mode :), I mean
16-bit apps in Win 3.x and W9x

To be honest, I don't know that much about these systems, but if they
have a concept of kernel and user modes, you could not have used
CLI/STI from the user mode. These are privileged instructions that can
get executed only by the code serment that runs at DPL 0 - if
non-privileged code tries to execute them, General Protection Fault
exception gets raised. This condition is enforced by the CPU itself, so
that it does not depend on OS version and flavour.


That correct only for protected mode of x86 and it have some few others you
can read in Intels manuals. Those Windows ( 3.x ) I mentioned were dos
extenders so they have no kernel/user modes at all

Arkady

In any case, if you use these instructions, you can enable/disable all
maskable
interrupts as a whole, but the OP wants to disable interrupts only for
some certain IRQ, without disabling all maskable interrupts. Therefore,
CLI is of no help here.
I don't know how you do it on PIC HAL, but on APIC HAL you can do it
via IOAPIC. Please check Intel IOAPIC Manual for more info.

Anton Bassov




On Jan 25, 2:12 pm, "Arkady Frenkel" <arka...@xxxxxxxxxxxxxxxx> wrote:
Anton!

"anton bassov" <soviet_bl...@xxxxxxxxxxx> wrote in
messagenews:1169726479.007059.282540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Arkady,

I never see assembly code that run on different CPU type :)

Don't forget that, apart from CPU, there is also motherboard......
This is why we have PIC HAL and APIC HAL. In addition to that, on newer
motherboards there is also a thing known as MSI, so that interrupts may
be vectored directly...cli/sti worked nice for me ( with PIC/APIC )
even in user mode :), I mean
16-bit apps in Win 3.x and W9x

Furhermore, don't forget that, due to hyperthreading and multi-core
technologies, any computer released in the last 2 years is SMP machine,
from the system's perspective, so that CLI, executed by CPU X, does not
disable interrupts on CPU Y.....

To summarize, these days relying upon assembly and/or x86-specific
features is not as easy as it used to be few years
ago.....Multiprocessor machines exist already many years ( Seymour Cray
built his
first multiprocessor supercomputer before 25 years ) and still it remain
big
problem of s/w , so what....
Arkady

P.S. BTW cli/sti ( acronyms I mean ) are rear opcodes that exist in many
assembly languages opposite to other opcodes.



Anton Bassov
.

On Jan 25, 9:17 am, "Arkady Frenkel" <arka...@xxxxxxxxxxxxxxxx> wrote:
I never see assembly code that run on different CPU type :)
Arkady

"anton bassov" <soviet_bl...@xxxxxxxxxxx> wrote in
messagenews:1169677078.372451.46480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Arkady,

Look at cli / sti - assembly opcodes

These opcodes enable and disable interrupts on a given CPU on
"all-or-none" basis, and this is not what the OP wants. Furthermore,
they affect only the given CPU, and the OP wants to disable IRQ for
all
CPUs. Therefore, tricks with IF flag is of no help here - instead,
you
have to do it via IOAPIC (on APIC HAL).

However, as Don properly pointed out, doing so is unwise, at least
in
commercial-grade product that is meant to run of different computers
and HALs...

Anton Bassov

On Jan 24, 8:09 am, "Arkady Frenkel" <arka...@xxxxxxxxxxxxxxxx>
wrote:
Look at cli / sti - assembly opcodes
Arkady

"shoeb" <shoeb....@xxxxxxxxxxxxxxx> wrote in
messagenews:uUmm%23F4PHHA.4296@xxxxxxxxxxxxxxxxxxxxxxx

how can i disble irq15 through C/assembly programming.
thanks- Hide quoted text -- Show quoted text -- Hide quoted
text --
Show quoted text -- Hide quoted text -- Show quoted text -



.



Relevant Pages

  • Re: how can i disble irq15 through C/assembly programming.
    ... BTW Dave Cutler (father of Windows NT) built his ... hyperthreaded CPU. ... CLI/STI from the user mode. ... interrupts as a whole, but the OP wants to disable interrupts only for ...
    (microsoft.public.win32.programmer.kernel)
  • Re: how can i disble irq15 through C/assembly programming.
    ... CPU. ... term "multi-processor machine" meant the machine that is physically ... CLI/STI from the user mode. ... interrupts as a whole, but the OP wants to disable interrupts only for ...
    (microsoft.public.win32.programmer.kernel)
  • Re: how can i disble irq15 through C/assembly programming.
    ... Power PC of IBM, MIPSand Intel's x86. ... different archtecture and even for for x86 drivers are user mode dlls. ... equipped with more than one CPU, ... interrupts as a whole, but the OP wants to disable interrupts only for ...
    (microsoft.public.win32.programmer.kernel)
  • RE: [question] IPC queue filling-up problem?
    ... on our actual systems our IPC ... top shows that something is eating cpu cycles in User mode on ... scheduled in time, because CPU starves. ... the ipcs -q shows that the queue is getting full comparing to ...
    (Linux-Kernel)
  • [PATCH] x86_64: fix delayed signals
    ... do_notify_resumebefore going to user mode. ... or asynchronously by interrupts or other CPUs ... The second signal's handler should interrupt the ... if (sigaction (SIGUSR1, &sa, NULL) ...
    (Linux-Kernel)