From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ronald G Minnich To: <9fans@cse.psu.edu> Subject: Re: [9fans] shared memory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Mon, 29 Jul 2002 07:59:35 -0600 Topicbox-Message-UUID: d51b5c44-eaca-11e9-9e20-41e7f4b1d025 I realized that a lot of code I sent you don't really need. On Mon, 29 Jul 2002, Ronald G Minnich wrote: struct pci_device pcidev; int sma_size_bits; int sma_size_mbytes; > > /* find the device */ > if ((pcidev = pci_find_device(PCI_VENDOR_ID_SI, > PCI_DEVICE_ID_SI_630, NULL)) == NULL) > return 0; > > /* see which banks are enabledd */ > pci_read_config_byte(pcidev, SIS630_BANKENABLE, &dram_status); > dimm_status = dram_status & 0x7; > > /* see if shared memory with integrated vga is enabled */ > sma_enable = dram_status & 0x80; > > /* compute Shared Menory Area (SMA) size in Mega Bytes */ > sma_size_bits = (dram_status >> 4) & 0x7; > if (sma_size_bits > 5) > // this is invalid! > sma_size = 0; > else { > sma_size = (2 << sma_size_bits); > } >