问题标签 [apic]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1016 浏览

iphone - iPhone 支持的 ID3 标签中的 APIC 格式有哪些?

iPhone在ID3标签的APIC(专辑封面)字段中支持哪些格式?

0 投票
2 回答
11773 浏览

interrupt - How CPU finds ISR and distinguishes between devices

I should first share all what I know - and that is complete chaos. There are several different questions on the topic, so please don't get irritated :).

1) To find an ISR, CPU is provided with a interrupt number. In x86 machines (286/386 and above) there is a IVT with ISRs in it; each entry of 4 bytes in size. So we need to multiply interrupt number by 4 to find the ISR. So first bunch of questions is - I am completely confused in mechanism of CPU receiving the interrupt. To raise an interrupt, firstly device shall probe for IRQ - then what ? The interrupt number travels "on IRQ" towards CPU? I also read something like device putting ISR address on data bus ; whats that then ? What is the concept of devices overriding the ISR. Can somebody tell me few example devices where CPU polls for interrupts? And where does it finds ISR for them ?

2) If two devices share an IRQ (which is very much possible), how does CPU differs amongst them ? What if both devices raise an interrupt of same priority simultaneously. I got to know there will be masking of same type and low priority interrupts - but how this communication happens between CPU and device controller? I studied the role of PIC and APIC for this problem, but could not understand.

Thanks for reading. Thank you very much for answering.

0 投票
1 回答
2925 浏览

python - 通过 Mutagen 更改 APIC ID3 标签中的嵌入图像类型

我有一个庞大的音乐库,我刚刚花了大约 30 个小时来整理它。对于某些 MP3 文件,我将封面艺术图像嵌入为类型 0(其他),我想将其更改为类型 3(封面)。有没有办法在 Python 中做到这一点,特别是在 Mutagen 中?

0 投票
5 回答
6995 浏览

php - 使用 getid3 (id3v2) 将 APIC 写入 mp3 文件

我正在尝试使用 getid3 将 APIC 图片写入 mp3 文件。这是代码;

但它不起作用。图像大小约为 1.5 MB。我应该调整它的大小还是某事?

我哪里错了?

谢谢

0 投票
1 回答
1076 浏览

memory-management - Help with APIC functions in Linux

I'm trying to play around with the local APIC functions in the 2.6.32.40 linux kernel, but I am having some issues. I want to try to send a Non-Maskable Interrupts (NMI) to all of the processors on my system (I am using a Intel i7 Q740). First I read the documentation in Intel's Software Developer's Manual Volume 3 related to the APIC functions. It states that interrupts can be broadcast to all processors through the use of the Interrupt Command Register (ICR) located at address 0xFEE00300. So I wrote a kernel module with the following init function to try to write to this register:

However, when I insmod this module the kernel crashes and complains about being unable to handle the paging request @ address 00000000fee00300. Looking under /proc/iomem I see that this address is in a ranged marked as "reserved"

I've also tried using the functions under :

but the kernel is still throwing "unable to handle paging request" messages and crashing. Does anyone have any suggestions? Why is this memory range marked as "reserved" and not marked as being used by the local APIC? Thanks in advance.

0 投票
1 回答
1001 浏览

linux - 将图像存储在 id3v2 框架 apic 中

我想找到一些命令行实用程序(Linux),可以将图像存储在 ID3v2 APIC 框架中但找不到任何东西,

尝试使用 ID3v2 util 但 id 不支持它。

0 投票
2 回答
47952 浏览

linux - 关于 Linux NMI 看门狗

现在遇到一个关于Linux NMI Watchdog 的问题。我想使用 Linux NMI 看门狗来检测和恢复操作系统挂起。因此,我将“nmi_watchdog=1”添加到 grub.cfg 中。然后检查/proc/interrupt,NMI 每秒被触发。但是在我加载一个带有死锁的模块(双重获取自旋锁)后,系统完全挂起,没有任何反应(永远不要恐慌!)。看起来 NMI 看门狗不起作用!

然后我阅读了 Documentation/nmi_watchdog.txt,上面写着:

请注意,使用本地 APIC 时,它生成的 NMI 中断频率取决于系统负载。缺少更好的源的本地 APIC NMI 看门狗使用“ cycle unhalted ”事件。

什么是“循环未停止”事件?

它补充说:

但是,如果您的系统锁定除“hlt”处理器指令之外的任何内容,则看门狗将很快触发,因为每个时钟滴答都会发生“循环未停止”事件......如果它锁定在“hlt”上,那么你就出局了幸运的是——事件根本不会发生,看门狗也不会触发。

如果处理器执行“hlt”指令,似乎看门狗不会触发,然后我在“ Intel 64 and IA-32 Architectures Software Developer's Manual, Volumn 2A ”中搜索“hlt”,它的描述如下:

停止指令执行并将处理器置于 HALT 状态。启用的中断(包括 NMI 和 SMI)、调试异常、BINIT# 信号、INIT# 信号或 RESET# 信号将恢复 执行。

然后我就迷路了……

我的问题是:

  • Linux NMI 看门狗如何工作?
  • 触发了 NMI?

我的操作系统是 Ubuntu 10.04 LTS,Linux-2.6.32.21,CPU Pentium 4 Dual-core 3.20 GHz。

我没有阅读有关 NMI 看门狗的完整源代码(没有时间),如果我无法理解 NMI 看门狗是如何工作的,我想使用性能监控计数器中断处理器间中断(由 APIC 提供)来发送 NMI NMI 看门狗。

0 投票
1 回答
4219 浏览

linux - 为什么我不能处理 NMI?

我想处理 NMI 并在 NMI 发生时做一些事情。首先,我编写了一个幼稚的 nmi 处理程序:

并编写一个模块来注册我的 nmi 处理程序,然后使用 APIC 触发 NMI 5 次:

现在我输入“insmod xxx.ko”来安装这个模块,然后,我检查/var/log/syslog:

显示我注册nmi_handler成功(result=0),NMI被触发了5次,但是我没有找到应该在nmi_handler中输出的sting。我在 Ubuntu 10.04 LTS、Intel Pentium 4 Dual-core 上工作。

  • 这是否意味着我的 NMI 处理程序没有执行?
  • 如何在 Linux 中处理 NMI?
0 投票
1 回答
441 浏览

python - python 3 mp3艺术品

我有一个简单的 Python 程序,可以从 MP3 文件中获取艺术作品。但是当我尝试在我的网页中打开生成的文件时,它没有加载。

这是我的代码:

0 投票
1 回答
1501 浏览

c - 在 DOS 模式下实现消息信号中断

我有点卡在编程设备MSI(消息信号中断)上,欢迎任何指针...... (我的环境是 Watcom C + DOS/32a - dos 扩展器,在平面模式下......)

@ PIC(8259) 模式对我来说没问题...

我在下面列出了我所做的事情,也许有人可以帮助澄清这些......谢谢!

(1)多消息启用 = 0(对于单个 MSI 设置此字段 = 0;MMC = 100b)

(2) MSI能力中的MSI消息地址寄存器

  • 位[31:20] = 0xFEE
  • bit[19:12] = 0(目标 ID,并找到本地 APIC ID = 0...)
  • bit3 = 0(重定向提示 = 0)
  • bit2 = 0(目标模式,不关心,因为 RH = 0)

(3) MSI能力中的MSI消息数据寄存器

  • bit15 = 0(触发模式 = 边沿)
  • bit14 = 0(触发电平,如果触发模式 = 边沿则忽略)
  • 位[10:8] = 000(传送模式 = 固定)
  • bit[7:0] = 0x20(向量,我选择使用0x20)

(4)最后通过设置 MSICAP.MC.MSIE = 1 来启用 MSI

  1. 我已经大致阅读了文档(第 10 章)http://download.intel.com/products/processor/manual/253668.pdf
  2. 我认为没有必要对 IO APIC 和本地 APIC 寄存器进行编程,因为 MSI 不会路由到 APIC 系统......!

当前状态:启用 MSIE = 1 后发现系统挂起,设备通过 MSI 产生中断!

注意:在上面的序列中,没有安装服务例程,因为我不知道该怎么做......(这是我的应用程序挂起的原因吗?)

谢谢 !

[20120822 更新]将Message Data字段 中的向量设置为 0x20 时,app 挂起...但如果设置为 0x76,我发现 app 没有挂起,然后我可以检查设备是否产生中断,Local APIC 收到此中断消息如下:

  1. 对于 PCI 设备(AHCI 控制器):

    • ID(中断禁用)= 0
    • IS(中断状态)= 0
    • MSI 上限 = 09,FEE00000,00000076
  2. 对于 AHCI HBA 寄存器:

    • PxIS = 00000023
    • PxIE = 7DC0007F
    • IS = 00000001
    • IE 位 1 = 1

通过 1 和 2,我认为设备成功发送消息以请求服务,因为:

  • IS bit0 = 1(端口 0 有挂起的中断状态)
  • IE(中断启用)= 1
  • PCI 命令寄存器 bit10(ID) = 0
  • MSICAP.MC.MSIE = 1(至 MSI 引擎)

我还发现 LAPIC 收到了这个中断消息,因为:

  • 本地 APIC IRR(中断请求寄存器) bit118(=0x76) = 1
  • 本地 APIC ISR(In-Service register) bit118(=0x76) = 1

因此,设备似乎产生了中断,而本地 APIC 接收到了这个;即便如此,我的服务程序也没有被调用!