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



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

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

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 -

.



Relevant Pages

  • Re: Reliable timing using RDTSC
    ... You can disable interrupts and context switches, ... amounts of things in CPU caches before you start. ...
    (comp.lang.asm.x86)
  • Re: Reliable timing using RDTSC
    ... You can disable interrupts and context switches, ... amounts of things in CPU caches before you start. ...
    (comp.lang.asm.x86)
  • Re: [patch 05/10] Text Edit Lock - Alternative code for i386 and x86_64
    ... The common code should be in a common function. ... flags argument is passed without &. ... Should disable interrupts too just to be safer? ... interrupt handler will run with WP flag cleared on the CPU. ...
    (Linux-Kernel)
  • Re: Spinlocks
    ... Multi CPU systems. ... Even if you disable interrupts on one CPU it may still be taken ... So you need to disable interrupts to protect ... against interrupts on the same CPU and the spinlock to protect ...
    (comp.os.linux.development.system)
  • Re: how can i disble irq15 through C/assembly programming.
    ... These opcodes enable and disable interrupts on a given CPU on ... they affect only the given CPU, and the OP wants to disable IRQ for all ... Anton Bassov ...
    (microsoft.public.win32.programmer.kernel)