Found some document about size determination in pci devices
had run lspi
jean@jean-Soisy:~$ sudo lspci -vv -k -xxxx -s 03:09.0
03:09.0 VGA compatible controller: NVIDIA Corporation NV44A [GeForce 6200] (rev
a1) (prog-if 00 [VGA controller])
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 40 (1250ns min, 250ns max)
Interrupt: pin A routed to IRQ 21
Region 0: Memory at 94000000 (32-bit, non-prefetchable) [size=16M]
Region 1: Memory at c0000000 (32-bit, prefetchable) [size=512M]
Region 2: Memory at 92000000 (32-bit, non-prefetchable) [size=16M]
[virtual] Expansion ROM at e0000000 [disabled] [size=128K]
Capabilities: [60] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: nouveau
00: de 10 21 02 06 01 b0 02 a1 00 00 03 00 28 00 00
10: 00 00 00 94 08 00 00 c0 00 00 00 92 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 60 00 00 00 00 00 00 00 09 01 05 01
40: 00 00 00 00 02 00 30 00 03 00 00 1f 00 00 00 00
50: 00 00 00 00 01 00 00 00 ce d6 23 00 0f 00 00 00
60: 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 01 04 40 c1 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
So, value defines as BAR1 located at adress 0x14 in parameters with
value 08 00 00 c0
means : adress is 0xc0000000 with 0x8 = prefetchable
for memory size determination methos is
https://wiki.osdev.org/PCI
https://stackoverflow.com/questions/19006632/how-is-a-pci-pcie-bar-size-determined/39618552#39618552
To determine the amount of address space needed by a PCI device, you must save
the original value of the BAR,
write a value of all 1's to the register, then read it back.
The amount of memory can then be determined by masking the information bits,
performing a bitwise NOT ('~' in C), and incrementing the value by 1. The
original value of the BAR should then be restored.
on my computer : using sudo bless
parameter are located at /sys/bus/pci/devices/0000:03:09.0/config
replaced 08 00 00 c0 by ff ff ff ff then, computer blocked, but was able to
read 08 00 00 e0
that means
dropping 4 bits LSB -> 00 00 00 e0
inverting bitwise ff ff ff 10
adding one 00 00 00 20 means 512 M
BUT https://www.xilinx.com/Attachment/PCI_SPEV_V3_0.pdf
6.2.5.1. Address Maps
Devices are free to consume more address space than required
after explanation of a computation method, precision is given
The resultant 32-bit value is the memory/I/O range size decoded by the
register.
I Think that the problem is here = adress space decoded, but not
populated
Regards
Jean COLIN
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1737423
Title:
With a (cheap) video card in PCI Geforce 6200 (NV44A) with 256Mb video
memory misdetected as 512 Mb : result was kernel panic in worst case
and memory crash in best case
Status in linux package in Ubuntu:
Confirmed
Bug description:
Under XP
card detected as
PCI\VEN_10DE&DEV_0221&SUBSYS_00000000&REV_A1\4&3A321F38&0&48F0
PCI\VEN_10DE&DEV_0221&SUBSYS_00000000&REV_A1\4&3A321F38&0&48F0
PCI\VEN_10DE&DEV_0221&SUBSYS_00000000&REV_A1
PCI\VEN_10DE&DEV_0221&CC_030000
memory range 94000000 94FFFFFF
memory range C0000000 DFFFFFFF
memory range 92000000 92FFFFFF
IRQ 09
IO range 03B0 03BB
IO range 03C0 03DF
memory range 000A0000 000BFFFF
Processeur graphique : GeForce 6200
Version du pilote : 307.83
Prise en charge DirectX : 9.0c
Horloge principale : 300 MHz
Débit de données mémoire : 1064 MHz
Interface de mémoire : 64 bits
Mémoire : 256 Mo
Type de mémoire : DDR2
Version BIOS vidéo : 5.44.A2.10.26
IRQ : 9
Bus : PCI
correctly detected as 256Mb and working
Under linux
file /var/log/Xorg.0.log
contains 18.759] (--) PCI: (0:3:9:0) 10de:0221:0000:0000 rev 161, Mem @
0x94000000/16777216, 0xc0000000/536870912, 0x92000000/16777216, BIOS @
0x????????/131072
card bad detection ... 0xc0000000/536870912 correct adress, wrong size
536870912 soit 512Mo
output of:
sudo lshw -C display; lsb_release -a; uname -a
is
jean@jean-Soisy:~$ sudo lshw -C display; lsb_release -a; uname -a
[sudo] password for jean:
*-display
description: Display controller
produit: 82865G Integrated Graphics Controller
fabriquant: Intel Corporation
identifiant matériel: 2
information bus: pci@0000:00:02.0
version: 02
bits: 32 bits
horloge: 33MHz
fonctionnalités: pm bus_master cap_list rom
configuration: driver=i915 latency=0
ressources: irq:16 mémoire:a0000000-a7ffffff mémoire:90000000-9007ffff
portE/S:1800(taille=8)
*-display
description: VGA compatible controller
produit: NV44A [GeForce 6200]
fabriquant: NVIDIA Corporation
identifiant matériel: 9
information bus: pci@0000:03:09.0
version: a1
bits: 32 bits
horloge: 66MHz
fonctionnalités: pm vga_controller bus_master cap_list rom
configuration: driver=nouveau latency=40 maxlatency=1 mingnt=5
ressources: irq:21 mémoire:94000000-94ffffff mémoire:c0000000-dfffffff
mémoire:92000000-92ffffff mémoire:e0000000-e001ffff
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
Linux jean-Soisy 3.13.0-135-generic #184-Ubuntu SMP Wed Oct 18 11:56:31 UTC
2017 i686 i686 i686 GNU/Linux
Attempted to find where the memory size detection lies in the code,
but was too far in the labyrinth for me.
Regards
Jean COLIN
---
ApportVersion: 2.14.1-0ubuntu3.27
Architecture: i386
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC1: jean 2206 F.... pulseaudio
/dev/snd/controlC0: jean 2206 F.... pulseaudio
CurrentDesktop: XFCE
DistroRelease: Ubuntu 14.04
HibernationDevice: RESUME=UUID=2ae1454f-4490-4a9a-aea5-55daa49c243c
InstallationDate: Installed on 2015-08-08 (985 days ago)
InstallationMedia: Xubuntu 12.04.3 LTS "Precise Pangolin" - Release i386
(20130820)
MachineType: IBM 8429RG7
Package: linux (not installed)
ProcFB:
0 inteldrmfb
1 nouveaufb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-144-generic
root=UUID=0f7280ad-8482-48be-9433-13ca09f7304a ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.13.0-144.193-generic 3.13.11-ckt39
RelatedPackageVersions:
linux-restricted-modules-3.13.0-144-generic N/A
linux-backports-modules-3.13.0-144-generic N/A
linux-firmware 1.127.24
RfKill:
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Tags: trusty
Uname: Linux 3.13.0-144-generic i686
UpgradeStatus: Upgraded to trusty on 2015-08-08 (985 days ago)
UserGroups: adm cdrom dialout dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 07/06/2005
dmi.bios.vendor: IBM
dmi.bios.version: 2AKT51AUS
dmi.board.name: IBM
dmi.board.vendor: IBM
dmi.chassis.asset.tag: ������������������������
dmi.chassis.type: 4
dmi.chassis.vendor: IBM
dmi.modalias:
dmi:bvnIBM:bvr2AKT51AUS:bd07/06/2005:svnIBM:pn8429RG7:pvr:rvnIBM:rnIBM:rvr:cvnIBM:ct4:cvr:
dmi.product.name: 8429RG7
dmi.sys.vendor: IBM
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1737423/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp