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



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...


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.

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: Spinlocks
    ... Now I'm wondering if I should have used spinlocks at ... Couldn't I have just disable interrupts in in the noninterrupt ... An interrupt can happen on other CPU ...
    (comp.os.linux.development.system)
  • Re: [parisc-linux] [patch 15/23] Add cmpxchg_local to parisc
    ... non-SMP-safe counter that protects updates against interrupts. ... could be vastely used in the kernel. ... "Local atomic operations only guarantee variable modification atomicity ... that only one CPU writes to the local_t data. ...
    (Linux-Kernel)
  • Re: program runs almost twice as slow on 2 CPU machine when 1 CPU
    ... As I said, from the system management tool's perspective, the term 'CPU ... load' means system and user threads vs idle thread - interrupts and DPC ... interrupts - only port and miniport drivers do it. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu
    ... Thats what I'm doing at the moment. ... unicast interrupts delivered accross the ht bus to a single cpu, ... that that broadcast bit was set. ...
    (Linux-Kernel)
  • Re: Model and CPU
    ... Is there a list of CPU types associated with model? ... While there is not a direct command to determine processor speed in AIX V4, ... Note on some machines the ... Each 2 way processor resides on one CPU card. ...
    (comp.unix.aix)