亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? setpci.c

?? The PCI Utilities package contains a library for portable access to PCI bus configuration registers
?? C
字號:
/* *	The PCI Utilities -- Manipulate PCI Configuration Registers * *	Copyright (c) 1998--2006 Martin Mares <mj@ucw.cz> * *	Can be freely distributed and used under the terms of the GNU GPL. */#include <stdio.h>#include <string.h>#include <stdlib.h>#include <stdarg.h>#include <unistd.h>#include "pciutils.h"static int force;			/* Don't complain if no devices match */static int verbose;			/* Verbosity level */static int demo_mode;			/* Only show */const char program_name[] = "setpci";static struct pci_access *pacc;struct value {  unsigned int value;  unsigned int mask;};struct op {  struct op *next;  struct pci_dev **dev_vector;  unsigned int addr;  unsigned int width;			/* Byte width of the access */  int num_values;			/* Number of values to write; <0=read */  struct value values[0];};static struct op *first_op, **last_op = &first_op;static unsigned int max_values[] = { 0, 0xff, 0xffff, 0, 0xffffffff };static struct pci_dev **select_devices(struct pci_filter *filt){  struct pci_dev *z, **a, **b;  int cnt = 1;  for(z=pacc->devices; z; z=z->next)    if (pci_filter_match(filt, z))      cnt++;  a = b = xmalloc(sizeof(struct device *) * cnt);  for(z=pacc->devices; z; z=z->next)    if (pci_filter_match(filt, z))      *a++ = z;  *a = NULL;  return b;}static voidexec_op(struct op *op, struct pci_dev *dev){  char *formats[] = { NULL, "%02x", "%04x", NULL, "%08x" };  char *mask_formats[] = { NULL, "%02x->(%02x:%02x)->%02x", "%04x->(%04x:%04x)->%04x", NULL, "%08x->(%08x:%08x)->%08x" };  unsigned int x, y;  int i, addr;  int width = op->width;  if (verbose)    printf("%02x:%02x.%x:%02x", dev->bus, dev->dev, dev->func, op->addr);  addr = op->addr;  if (op->num_values >= 0)    {      for(i=0; i<op->num_values; i++)	{	  if ((op->values[i].mask & max_values[width]) == max_values[width])	    {	      x = op->values[i].value;	      if (verbose)		{		  putchar(' ');		  printf(formats[width], op->values[i].value);		}	    }	  else	    {	      switch (width)		{		case 1:		  y = pci_read_byte(dev, addr);		  break;		case 2:		  y = pci_read_word(dev, addr);		  break;		default:		  y = pci_read_long(dev, addr);		  break;		}	      x = (y & ~op->values[i].mask) | op->values[i].value;	      if (verbose)		{		  putchar(' ');		  printf(mask_formats[width], y, op->values[i].value, op->values[i].mask, x);		}	    }	  if (!demo_mode)	    {	      switch (width)		{		case 1:		  pci_write_byte(dev, addr, x);		  break;		case 2:		  pci_write_word(dev, addr, x);		  break;		default:		  pci_write_long(dev, addr, x);		  break;		}	    }	  addr += width;	}      if (verbose)	putchar('\n');    }  else    {      if (verbose)	printf(" = ");      switch (width)	{	case 1:	  x = pci_read_byte(dev, addr);	  break;	case 2:	  x = pci_read_word(dev, addr);	  break;	default:	  x = pci_read_long(dev, addr);	  break;	}      printf(formats[width], x);      putchar('\n');    }}static voidexecute(struct op *op){  struct pci_dev **vec = NULL;  struct pci_dev **pdev, *dev;  struct op *oops;  while (op)    {      pdev = vec = op->dev_vector;      while (dev = *pdev++)	for(oops=op; oops && oops->dev_vector == vec; oops=oops->next)	  exec_op(oops, dev);      while (op && op->dev_vector == vec)	op = op->next;    }}static voidscan_ops(struct op *op){  while (op)    {      if (op->num_values >= 0)	pacc->writeable = 1;      op = op->next;    }}struct reg_name {  unsigned int offset;  unsigned int width;  const char *name;};static const struct reg_name pci_reg_names[] = {  { 0x00, 2, "VENDOR_ID", },  { 0x02, 2, "DEVICE_ID", },  { 0x04, 2, "COMMAND", },  { 0x06, 2, "STATUS", },  { 0x08, 1, "REVISION", },  { 0x09, 1, "CLASS_PROG", },  { 0x0a, 2, "CLASS_DEVICE", },  { 0x0c, 1, "CACHE_LINE_SIZE", },  { 0x0d, 1, "LATENCY_TIMER", },  { 0x0e, 1, "HEADER_TYPE", },  { 0x0f, 1, "BIST", },  { 0x10, 4, "BASE_ADDRESS_0", },  { 0x14, 4, "BASE_ADDRESS_1", },  { 0x18, 4, "BASE_ADDRESS_2", },  { 0x1c, 4, "BASE_ADDRESS_3", },  { 0x20, 4, "BASE_ADDRESS_4", },  { 0x24, 4, "BASE_ADDRESS_5", },  { 0x28, 4, "CARDBUS_CIS", },  { 0x2c, 4, "SUBSYSTEM_VENDOR_ID", },  { 0x2e, 2, "SUBSYSTEM_ID", },  { 0x30, 4, "ROM_ADDRESS", },  { 0x3c, 1, "INTERRUPT_LINE", },  { 0x3d, 1, "INTERRUPT_PIN", },  { 0x3e, 1, "MIN_GNT", },  { 0x3f, 1, "MAX_LAT", },  { 0x18, 1, "PRIMARY_BUS", },  { 0x19, 1, "SECONDARY_BUS", },  { 0x1a, 1, "SUBORDINATE_BUS", },  { 0x1b, 1, "SEC_LATENCY_TIMER", },  { 0x1c, 1, "IO_BASE", },  { 0x1d, 1, "IO_LIMIT", },  { 0x1e, 2, "SEC_STATUS", },  { 0x20, 2, "MEMORY_BASE", },  { 0x22, 2, "MEMORY_LIMIT", },  { 0x24, 2, "PREF_MEMORY_BASE", },  { 0x26, 2, "PREF_MEMORY_LIMIT", },  { 0x28, 4, "PREF_BASE_UPPER32", },  { 0x2c, 4, "PREF_LIMIT_UPPER32", },  { 0x30, 2, "IO_BASE_UPPER16", },  { 0x32, 2, "IO_LIMIT_UPPER16", },  { 0x38, 4, "BRIDGE_ROM_ADDRESS", },  { 0x3e, 2, "BRIDGE_CONTROL", },  { 0x10, 4, "CB_CARDBUS_BASE", },  { 0x14, 2, "CB_CAPABILITIES", },  { 0x16, 2, "CB_SEC_STATUS", },  { 0x18, 1, "CB_BUS_NUMBER", },  { 0x19, 1, "CB_CARDBUS_NUMBER", },  { 0x1a, 1, "CB_SUBORDINATE_BUS", },  { 0x1b, 1, "CB_CARDBUS_LATENCY", },  { 0x1c, 4, "CB_MEMORY_BASE_0", },  { 0x20, 4, "CB_MEMORY_LIMIT_0", },  { 0x24, 4, "CB_MEMORY_BASE_1", },  { 0x28, 4, "CB_MEMORY_LIMIT_1", },  { 0x2c, 2, "CB_IO_BASE_0", },  { 0x2e, 2, "CB_IO_BASE_0_HI", },  { 0x30, 2, "CB_IO_LIMIT_0", },  { 0x32, 2, "CB_IO_LIMIT_0_HI", },  { 0x34, 2, "CB_IO_BASE_1", },  { 0x36, 2, "CB_IO_BASE_1_HI", },  { 0x38, 2, "CB_IO_LIMIT_1", },  { 0x3a, 2, "CB_IO_LIMIT_1_HI", },  { 0x40, 2, "CB_SUBSYSTEM_VENDOR_ID", },  { 0x42, 2, "CB_SUBSYSTEM_ID", },  { 0x44, 4, "CB_LEGACY_MODE_BASE", },  { 0x00, 0, NULL }};static void NONRETusage(char *msg, ...){  va_list args;  va_start(args, msg);  if (msg)    {      fprintf(stderr, "setpci: ");      vfprintf(stderr, msg, args);      fprintf(stderr, "\n\n");    }  fprintf(stderr,"Usage: setpci [<options>] (<device>+ <reg>[=<values>]*)*\n\-f\t\tDon't complain if there's nothing to do\n\-v\t\tBe verbose\n\-D\t\tList changes, don't commit them\n"GENERIC_HELP"<device>:\t-s [[[<domain>]:][<bus>]:][<slot>][.[<func>]]\n""\t|\t-d [<vendor>]:[<device>]\n""<reg>:\t\t<number>[.(B|W|L)]\n""     |\t\t<name>\n""<values>:\t<value>[,<value>...]\n""<value>:\t<hex>\n""       |\t<hex>:<mask>\n");  exit(1);}intmain(int argc, char **argv){  enum { STATE_INIT, STATE_GOT_FILTER, STATE_GOT_OP } state = STATE_INIT;  struct pci_filter filter;  struct pci_dev **selected_devices = NULL;  char *opts = GENERIC_OPTIONS ;  if (argc == 2 && !strcmp(argv[1], "--version"))    {      puts("setpci version " PCIUTILS_VERSION);      return 0;    }  argc--;  argv++;  pacc = pci_alloc();  pacc->error = die;  while (argc && argv[0][0] == '-')    {      char *c = argv[0]+1;      char *d = c;      char *e;      while (*c)	switch (*c)	  {	  case 'v':	    verbose++;	    c++;	    break;	  case 'f':	    force++;	    c++;	    break;	  case 'D':	    demo_mode++;	    c++;	    break;	  case 0:	    break;	  default:	    if (e = strchr(opts, *c))	      {		char *arg;		c++;		if (e[1] == ':')		  {		    if (*c)		      arg = c;		    else if (argc > 1)		      {			arg = argv[1];			argc--; argv++;		      }		    else		      usage(NULL);		    c = "";		  }		else		  arg = NULL;		if (!parse_generic_option(*e, pacc, arg))		  usage(NULL);	      }	    else	      {		if (c != d)		  usage(NULL);		goto next;	      }	  }      argc--;      argv++;    }next:  pci_init(pacc);  pci_scan_bus(pacc);  while (argc)    {      char *c = argv[0];      char *d, *e, *f;      int n, i;      struct op *op;      unsigned long ll;      unsigned int lim;      if (*c == '-')	{	  if (!c[1] || !strchr("sd", c[1]))	    usage(NULL);	  if (c[2])	    d = (c[2] == '=') ? c+3 : c+2;	  else if (argc > 1)	    {	      argc--;	      argv++;	      d = argv[0];	    }	  else	    usage(NULL);	  if (state != STATE_GOT_FILTER)	    {	      pci_filter_init(pacc, &filter);	      state = STATE_GOT_FILTER;	    }	  switch (c[1])	    {	    case 's':	      if (d = pci_filter_parse_slot(&filter, d))		die("-s: %s", d);	      break;	    case 'd':	      if (d = pci_filter_parse_id(&filter, d))		die("-d: %s", d);	      break;	    default:	      usage(NULL);	    }	}      else if (state == STATE_INIT)	usage(NULL);      else	{	  if (state == STATE_GOT_FILTER)	    selected_devices = select_devices(&filter);	  if (!selected_devices[0] && !force)	    fprintf(stderr, "setpci: Warning: No devices selected for `%s'.\n", c);	  state = STATE_GOT_OP;	  /* look for setting of values and count how many */	  d = strchr(c, '=');	  if (d)	    {	      *d++ = 0;	      if (!*d)		usage("Missing value");	      for(e=d, n=1; *e; e++)		if (*e == ',')		  n++;	      op = xmalloc(sizeof(struct op) + n*sizeof(struct value));	    }	  else	    {	      n = -1;	      op = xmalloc(sizeof(struct op));	    }	  op->dev_vector = selected_devices;	  op->num_values = n;	  e = strchr(c, '.');	  if (e)	    {	      *e++ = 0;	      if (e[1])		usage("Missing width");	      switch (*e & 0xdf)		{		case 'B':		  op->width = 1; break;		case 'W':		  op->width = 2; break;		case 'L':		  op->width = 4; break;		default:		  usage("Invalid width \"%c\"", *e);		}	    }	  else	    op->width = 1;	  ll = strtol(c, &f, 16);	  if (f && *f)	    {	      const struct reg_name *r;	      for(r = pci_reg_names; r->name; r++)		if (!strcasecmp(r->name, c))		  break;	      if (!r->name)		usage("Unknown register \"%s\"", c);	      if (e && op->width != r->width)		usage("Explicit width doesn't correspond with the named register \"%s\"", c);	      ll = r->offset;	      op->width = r->width;	    }	  if (ll > 0x1000 || ll + op->width*((n < 0) ? 1 : n) > 0x1000)	    die("Register number out of range!");	  if (ll & (op->width - 1))	    die("Unaligned register address!");	  op->addr = ll;	  /* read in all the values to be set */	  for(i=0; i<n; i++)	    {	      e = strchr(d, ',');	      if (e)		*e++ = 0;	      ll = strtoul(d, &f, 16);	      lim = max_values[op->width];	      if (f && *f && *f != ':')		usage("Invalid value \"%s\"", d);	      if (ll > lim && ll < ~0UL - lim)		usage("Value \"%s\" is out of range", d);	      op->values[i].value = ll;	      if (f && *f == ':')		{		  d = ++f;		  ll = strtoul(d, &f, 16);		  if (f && *f)		    usage("Invalid mask \"%s\"", d);		  if (ll > lim && ll < ~0UL - lim)		    usage("Mask \"%s\" is out of range", d);		  op->values[i].mask = ll;		  op->values[i].value &= ll;		}	      else		op->values[i].mask = ~0U;	      d = e;	    }	  *last_op = op;	  last_op = &op->next;	  op->next = NULL;	}      argc--;      argv++;    }  if (state == STATE_INIT)    usage("No operation specified");  scan_ops(first_op);  execute(first_op);  return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区小说| 在线观看欧美精品| 欧美午夜一区二区三区免费大片| 欧美人动与zoxxxx乱| 欧美激情在线一区二区| 丝袜亚洲另类丝袜在线| 91香蕉视频在线| 国产亚洲制服色| 激情欧美日韩一区二区| 在线观看区一区二| 国产精品久久国产精麻豆99网站 | 亚洲天堂精品在线观看| 美女视频黄a大片欧美| 日本韩国欧美一区二区三区| 久久精品在线观看| 蜜乳av一区二区三区| 精品视频在线看| 亚洲欧美偷拍另类a∨色屁股| 国产酒店精品激情| 欧美一级日韩不卡播放免费| 午夜精品免费在线观看| 在线精品视频免费观看| 日韩美女精品在线| 99视频一区二区| 国产欧美日韩三区| 国产伦精品一区二区三区免费迷| 日韩欧美激情一区| 美女www一区二区| 欧美电视剧免费全集观看| 日韩精品乱码免费| 欧美一区二区观看视频| 视频一区视频二区在线观看| 欧美日韩国产经典色站一区二区三区| 一区二区三区日韩| 日本电影欧美片| 亚洲成人福利片| 69精品人人人人| 捆绑调教美女网站视频一区| 日韩欧美在线网站| 国内精品国产成人| 国产欧美日韩在线看| aaa亚洲精品| 亚洲靠逼com| 欧美精品在欧美一区二区少妇| 日韩激情视频网站| 欧美成人女星排名| 成人在线视频一区二区| 亚洲人123区| 欧美日韩免费观看一区三区| 免费xxxx性欧美18vr| 日韩欧美一区中文| 国产传媒日韩欧美成人| 国产精品灌醉下药二区| 欧美亚洲综合一区| 精品一区二区三区在线播放视频| 久久伊99综合婷婷久久伊| k8久久久一区二区三区 | 欧美成人性战久久| 国产精品亚洲一区二区三区妖精 | 五月婷婷综合在线| 欧美一区二区三区影视| 粉嫩aⅴ一区二区三区四区五区 | 中文无字幕一区二区三区| 99re这里只有精品首页| 午夜精品123| 久久久久久久久久久久久女国产乱| av电影一区二区| 日韩精品久久理论片| 国产精品美女一区二区| 69精品人人人人| 99国产精品一区| 美日韩一区二区三区| 中文字幕在线一区| 日韩欧美一级精品久久| av成人老司机| 九一九一国产精品| 亚洲精品菠萝久久久久久久| 精品国产乱码久久久久久免费| 不卡的电影网站| 精品在线视频一区| 亚洲国产成人av网| 中文字幕不卡在线播放| 欧美一区二区啪啪| 欧美色区777第一页| 国产盗摄精品一区二区三区在线| 亚洲成人一二三| 亚洲人成小说网站色在线| 精品国产乱码久久久久久蜜臀| 91在线精品秘密一区二区| 国内精品写真在线观看| 性做久久久久久久久| 亚洲色图在线播放| 日本一区二区三级电影在线观看| 欧美一区二区精品久久911| 91丝袜国产在线播放| 国产69精品久久久久毛片| 奇米一区二区三区| 亚洲国产综合色| 亚洲免费观看在线观看| 国产精品色婷婷| 久久久久久久久久电影| 欧美tickling网站挠脚心| 欧美电影一区二区| 欧美视频一区在线| 色先锋aa成人| 一本到不卡精品视频在线观看| 高清视频一区二区| 国产一区二区精品久久| 精品一区二区久久| 国产一区二区三区免费观看| 青青草国产精品亚洲专区无| 日韩精品高清不卡| 日本aⅴ精品一区二区三区| 日韩av午夜在线观看| 午夜精品一区二区三区免费视频| 亚洲高清不卡在线| 亚洲成av人片一区二区梦乃| 午夜精品久久久久久久久| 亚洲线精品一区二区三区| 亚洲国产成人高清精品| 亚洲不卡一区二区三区| 婷婷综合另类小说色区| 日韩av成人高清| 韩国精品久久久| 国产精品一卡二卡在线观看| 国产不卡在线视频| 色婷婷久久99综合精品jk白丝| 色婷婷久久久综合中文字幕| 在线观看免费成人| 在线不卡的av| 久久一二三国产| 日韩毛片一二三区| 亚洲永久免费av| 蜜臀va亚洲va欧美va天堂| 久久se精品一区二区| 国产成人免费在线观看| 色老头久久综合| 欧美一区二区三区在线观看| 久久久久久久久97黄色工厂| 亚洲欧洲日韩av| 亚洲丶国产丶欧美一区二区三区| 免费成人在线网站| 风间由美一区二区av101| 日本精品视频一区二区三区| 欧美精品乱人伦久久久久久| 久久综合国产精品| 一区二区三区在线不卡| 久久精品国产99国产精品| av激情成人网| 欧美一区二区黄色| 中文字幕在线不卡国产视频| 香蕉影视欧美成人| 国产不卡免费视频| 精品日本一线二线三线不卡| 中文无字幕一区二区三区 | 在线免费亚洲电影| 久久亚洲综合av| 亚洲一区在线电影| 国产米奇在线777精品观看| 一本大道久久a久久精品综合| 欧美一区二区久久| 亚洲日本在线视频观看| 精品系列免费在线观看| 在线精品视频一区二区| 国产欧美日韩在线看| 日韩综合小视频| 91免费在线播放| 国产清纯白嫩初高生在线观看91 | 在线区一区二视频| 久久综合狠狠综合久久激情 | 欧美猛男gaygay网站| 日本一区二区电影| 麻豆精品精品国产自在97香蕉| 色婷婷综合久久久中文一区二区| 欧美精品一区二区久久婷婷| 亚洲电影中文字幕在线观看| av电影天堂一区二区在线观看| 2023国产精品| 久久机这里只有精品| 欧美性受xxxx黑人xyx性爽| 国产午夜精品一区二区三区视频| 人人狠狠综合久久亚洲| 欧美日韩一区视频| 中文字幕综合网| a亚洲天堂av| 国产精品久久久久一区| 国产精品伊人色| 久久麻豆一区二区| 国产精品中文字幕一区二区三区| 777奇米四色成人影色区| 亚洲一区中文日韩| 日本高清不卡在线观看| ...xxx性欧美| av高清不卡在线| 亚洲人123区| 91久久精品一区二区三| 亚洲激情自拍偷拍| 欧洲av一区二区嗯嗯嗯啊| 亚洲欧美国产毛片在线| 91麻豆福利精品推荐|