cfgtype.c

来自「linux syslinux source code」· C语言 代码 · 共 24 行

C
24
字号
#include "pci/pci.h"enum pci_config_type __pci_cfg_type;void pci_set_config_type(enum pci_config_type type){  uint32_t oldcf8;  if ( type == PCI_CFG_AUTO ) {    /* Try to detect CM #1 */    cli();    oldcf8 = inl(0xcf8);    outl(~0, 0xcf8);    if ( inl(0xcf8) == pci_mkaddr(255,31,7,252) )      type = PCI_CFG_TYPE1;    else      type = PCI_CFG_TYPE2;	/* ... it better be ... */    outl(oldcf8, 0xcf8);    sti();  }  __pci_cfg_type = type;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?