* /proc/iomem and /proc/ioports show 0 for address range
@ 2021-01-13 10:29 Hinko Kocevar
2021-01-13 18:45 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Hinko Kocevar @ 2021-01-13 10:29 UTC (permalink / raw)
To: Linux PCI
[I noticed this while working on PCI devices; not sure which kernel list
would be best for this, though]
I noticed that my system shows address range for iomem and ioports as
all 0. Sometimes (after a power cycle) the addresses are proper, albeit
I have not been able to see that in a while now, after performing
numerous reboots in the last coupe of days.
FWIW, I think the list of devices (names, count) looks the same in both
cases. The system seems to work in both cases; at least I have not seen
any complaints in kernel logs, OTOH, not sure what the error message
would be.
What may be the reason for not getting the proper addresses listed?
This likely poses any issues for userspace tools that would look at
those /proc files, OTOH, I wonder if would kernel suffer in any way as
well?
Kernel version is 5.10.0 (pci git tree).
[dev@bd-cpu18 ~]$ cat /proc/iomem
00000000-00000000 : Reserved
00000000-00000000 : System RAM
00000000-00000000 : Reserved
00000000-00000000 : PCI Bus 0000:00
00000000-00000000 : Video ROM
00000000-00000000 : Reserved
00000000-00000000 : System ROM
00000000-00000000 : System RAM
00000000-00000000 : Kernel code
00000000-00000000 : Kernel rodata
00000000-00000000 : Kernel data
00000000-00000000 : Kernel bss
00000000-00000000 : ACPI Non-volatile Storage
00000000-00000000 : Reserved
00000000-00000000 : System RAM
00000000-00000000 : Reserved
00000000-00000000 : System RAM
00000000-00000000 : ACPI Non-volatile Storage
00000000-00000000 : Reserved
00000000-00000000 : System RAM
00000000-00000000 : Reserved
00000000-00000000 : Graphics Stolen Memory
00000000-00000000 : PCI Bus 0000:00
00000000-00000000 : PCI Bus 0000:01
00000000-00000000 : PCI Bus 0000:02
00000000-00000000 : PCI Bus 0000:03
00000000-00000000 : PCI Bus 0000:04
00000000-00000000 : PCI Bus 0000:05
00000000-00000000 : PCI Bus 0000:06
00000000-00000000 : PCI Bus 0000:07
00000000-00000000 : PCI Bus 0000:08
00000000-00000000 : PCI Bus 0000:09
00000000-00000000 : 0000:00:02.0
00000000-00000000 : 0000:00:02.0
00000000-00000000 : PCI Bus 0000:01
00000000-00000000 : PCI Bus 0000:02
00000000-00000000 : PCI Bus 0000:03
00000000-00000000 : PCI Bus 0000:04
00000000-00000000 : PCI Bus 0000:08
00000000-00000000 : 0000:08:00.0
00000000-00000000 : xdma
00000000-00000000 : 0000:08:00.0
00000000-00000000 : xdma
00000000-00000000 : 0000:03:00.0
00000000-00000000 : 0000:01:00.0
00000000-00000000 : PCI Bus 0000:12
00000000-00000000 : 0000:12:00.0
00000000-00000000 : igb
00000000-00000000 : 0000:12:00.0
00000000-00000000 : igb
00000000-00000000 : PCI Bus 0000:11
00000000-00000000 : 0000:11:00.0
00000000-00000000 : igb
00000000-00000000 : 0000:11:00.0
00000000-00000000 : igb
00000000-00000000 : PCI Bus 0000:10
00000000-00000000 : 0000:10:00.0
00000000-00000000 : igb
00000000-00000000 : 0000:10:00.0
00000000-00000000 : igb
00000000-00000000 : PCI Bus 0000:0f
00000000-00000000 : 0000:0f:00.0
00000000-00000000 : igb
00000000-00000000 : 0000:0f:00.0
00000000-00000000 : igb
00000000-00000000 : 0000:00:1f.3
00000000-00000000 : ICH HD audio
00000000-00000000 : 0000:00:14.0
00000000-00000000 : xhci-hcd
00000000-00000000 : 0000:00:1f.3
00000000-00000000 : ICH HD audio
00000000-00000000 : 0000:00:1f.2
00000000-00000000 : 0000:00:17.0
00000000-00000000 : ahci
00000000-00000000 : 0000:00:1f.4
00000000-00000000 : 0000:00:17.0
00000000-00000000 : ahci
00000000-00000000 : 0000:00:17.0
00000000-00000000 : ahci
00000000-00000000 : 0000:00:16.0
00000000-00000000 : mei_me
00000000-00000000 : 0000:00:15.1
00000000-00000000 : lpss_dev
00000000-00000000 : i2c_designware.1 lpss_dev
00000000-00000000 : lpss_priv
00000000-00000000 : idma64.1
00000000-00000000 : idma64.1 idma64.1
00000000-00000000 : 0000:00:15.0
00000000-00000000 : lpss_dev
00000000-00000000 : i2c_designware.0 lpss_dev
00000000-00000000 : lpss_priv
00000000-00000000 : idma64.0
00000000-00000000 : idma64.0 idma64.0
00000000-00000000 : 0000:00:14.2
00000000-00000000 : Intel PCH thermal driver
00000000-00000000 : 0000:00:08.0
00000000-00000000 : pnp 00:04
00000000-00000000 : PCI MMCONFIG 0000 [bus 00-ff]
00000000-00000000 : Reserved
00000000-00000000 : pnp 00:04
00000000-00000000 : PCI Bus 0000:00
00000000-00000000 : pnp 00:05
00000000-00000000 : INT345D:00
00000000-00000000 : INT345D:00 INT345D:00
00000000-00000000 : pnp 00:05
00000000-00000000 : INT345D:00
00000000-00000000 : INT345D:00 INT345D:00
00000000-00000000 : INT345D:00
00000000-00000000 : INT345D:00 INT345D:00
00000000-00000000 : pnp 00:05
00000000-00000000 : iTCO_wdt
00000000-00000000 : Reserved
00000000-00000000 : pnp 00:05
00000000-00000000 : pnp 00:05
00000000-00000000 : pnp 00:05
00000000-00000000 : Reserved
00000000-00000000 : IOAPIC 0
00000000-00000000 : Reserved
00000000-00000000 : HPET 0
00000000-00000000 : PNP0103:00
00000000-00000000 : pnp 00:04
00000000-00000000 : pnp 00:04
00000000-00000000 : pnp 00:04
00000000-00000000 : pnp 00:04
00000000-00000000 : MSFT0101:00
00000000-00000000 : MSFT0101:00
00000000-00000000 : pnp 00:04
00000000-00000000 : dmar0
00000000-00000000 : dmar1
00000000-00000000 : Local APIC
00000000-00000000 : Reserved
00000000-00000000 : Reserved
00000000-00000000 : INT0800:00
00000000-00000000 : pnp 00:04
00000000-00000000 : System RAM
00000000-00000000 : RAM buffer
[dev@bd-cpu18 ~]$ cat /proc/ioports
0000-0000 : PCI Bus 0000:00
0000-0000 : dma1
0000-0000 : pic1
0000-0000 : timer0
0000-0000 : timer1
0000-0000 : keyboard
0000-0000 : keyboard
0000-0000 : rtc0
0000-0000 : dma page reg
0000-0000 : pic2
0000-0000 : dma2
0000-0000 : fpu
0000-0000 : PNP0C04:00
0000-0000 : vga+
0000-0000 : serial
0000-0000 : serial
0000-0000 : iTCO_wdt
0000-0000 : pnp 00:00
0000-0000 : pnp 00:01
0000-0000 : PCI conf1
0000-0000 : PCI Bus 0000:00
0000-0000 : pnp 00:00
0000-0000 : pnp 00:00
0000-0000 : ACPI PM1a_EVT_BLK
0000-0000 : ACPI PM1a_CNT_BLK
0000-0000 : ACPI PM_TMR
0000-0000 : ACPI PM2_CNT_BLK
0000-0000 : pnp 00:03
0000-0000 : ACPI GPE0_BLK
0000-0000 : PCI Bus 0000:01
0000-0000 : PCI Bus 0000:02
0000-0000 : PCI Bus 0000:03
0000-0000 : PCI Bus 0000:04
0000-0000 : PCI Bus 0000:05
0000-0000 : PCI Bus 0000:06
0000-0000 : PCI Bus 0000:07
0000-0000 : PCI Bus 0000:08
0000-0000 : PCI Bus 0000:09
0000-0000 : PCI Bus 0000:12
0000-0000 : 0000:12:00.0
0000-0000 : PCI Bus 0000:11
0000-0000 : 0000:11:00.0
0000-0000 : PCI Bus 0000:10
0000-0000 : 0000:10:00.0
0000-0000 : PCI Bus 0000:0f
0000-0000 : 0000:0f:00.0
0000-0000 : 0000:00:02.0
0000-0000 : 0000:00:1f.4
0000-0000 : i801_smbus
0000-0000 : 0000:00:17.0
0000-0000 : ahci
0000-0000 : 0000:00:17.0
0000-0000 : ahci
0000-0000 : 0000:00:17.0
0000-0000 : ahci
0000-0000 : pnp 00:06
0000-0000 : pnp 00:00
0000-0000 : pnp 00:00
0000-0000 : pnp 00:00
Thanks!
//hinko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: /proc/iomem and /proc/ioports show 0 for address range
2021-01-13 10:29 /proc/iomem and /proc/ioports show 0 for address range Hinko Kocevar
@ 2021-01-13 18:45 ` Randy Dunlap
2021-01-13 21:27 ` Hinko Kocevar
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2021-01-13 18:45 UTC (permalink / raw)
To: Hinko Kocevar, Linux PCI
On 1/13/21 2:29 AM, Hinko Kocevar wrote:
> [I noticed this while working on PCI devices; not sure which kernel list would be best for this, though]
>
> I noticed that my system shows address range for iomem and ioports as all 0. Sometimes (after a power cycle) the addresses are proper, albeit I have not been able to see that in a while now, after performing numerous reboots in the last coupe of days.
>
> FWIW, I think the list of devices (names, count) looks the same in both cases. The system seems to work in both cases; at least I have not seen any complaints in kernel logs, OTOH, not sure what the error message would be.
>
> What may be the reason for not getting the proper addresses listed?
config STRICT_DEVMEM
bool "Filter access to /dev/mem"
and
config IO_STRICT_DEVMEM
bool "Filter I/O access to /dev/mem"
so what are your CONFIG_STRICT_DEVMEM and CONFIG_IO_STRICT_DEVMEM set to?
What do you see in /proc/iomem and /proc/ioports if you are admin/root?
That should be non-zero values.
> This likely poses any issues for userspace tools that would look at those /proc files, OTOH, I wonder if would kernel suffer in any way as well?
Yes, it could affect userspace.
> Kernel version is 5.10.0 (pci git tree).
>
> [dev@bd-cpu18 ~]$ cat /proc/iomem
> 00000000-00000000 : Reserved
> 00000000-00000000 : System RAM
> 00000000-00000000 : Reserved
> 00000000-00000000 : PCI Bus 0000:00
> 00000000-00000000 : Video ROM
> 00000000-00000000 : Reserved
> 00000000-00000000 : System ROM
> 00000000-00000000 : System RAM
> 00000000-00000000 : Kernel code
> 00000000-00000000 : Kernel rodata
> 00000000-00000000 : Kernel data
> 00000000-00000000 : Kernel bss
--
~Randy
You can't do anything without having to do something else first.
-- Belefant's Law
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: /proc/iomem and /proc/ioports show 0 for address range
2021-01-13 18:45 ` Randy Dunlap
@ 2021-01-13 21:27 ` Hinko Kocevar
0 siblings, 0 replies; 3+ messages in thread
From: Hinko Kocevar @ 2021-01-13 21:27 UTC (permalink / raw)
To: Randy Dunlap, Linux PCI
On 1/13/21 7:45 PM, Randy Dunlap wrote:
> On 1/13/21 2:29 AM, Hinko Kocevar wrote:
>> [I noticed this while working on PCI devices; not sure which kernel list would be best for this, though]
>>
>> I noticed that my system shows address range for iomem and ioports as all 0. Sometimes (after a power cycle) the addresses are proper, albeit I have not been able to see that in a while now, after performing numerous reboots in the last coupe of days.
>>
>> FWIW, I think the list of devices (names, count) looks the same in both cases. The system seems to work in both cases; at least I have not seen any complaints in kernel logs, OTOH, not sure what the error message would be.
>>
>> What may be the reason for not getting the proper addresses listed?
>
> config STRICT_DEVMEM
> bool "Filter access to /dev/mem"
>
> and
>
> config IO_STRICT_DEVMEM
> bool "Filter I/O access to /dev/mem"
>
> so what are your CONFIG_STRICT_DEVMEM and CONFIG_IO_STRICT_DEVMEM set to?
Yeah, they're set. Did not notice that since I'm using some CentOS stock
config.
>
> What do you see in /proc/iomem and /proc/ioports if you are admin/root?
> That should be non-zero values.
You are right. Using sudo shows the values.
Thanks!
>
>> This likely poses any issues for userspace tools that would look at those /proc files, OTOH, I wonder if would kernel suffer in any way as well?
>
> Yes, it could affect userspace.
>
>> Kernel version is 5.10.0 (pci git tree).
>>
>> [dev@bd-cpu18 ~]$ cat /proc/iomem
>> 00000000-00000000 : Reserved
>> 00000000-00000000 : System RAM
>> 00000000-00000000 : Reserved
>> 00000000-00000000 : PCI Bus 0000:00
>> 00000000-00000000 : Video ROM
>> 00000000-00000000 : Reserved
>> 00000000-00000000 : System ROM
>> 00000000-00000000 : System RAM
>> 00000000-00000000 : Kernel code
>> 00000000-00000000 : Kernel rodata
>> 00000000-00000000 : Kernel data
>> 00000000-00000000 : Kernel bss
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-14 2:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 10:29 /proc/iomem and /proc/ioports show 0 for address range Hinko Kocevar
2021-01-13 18:45 ` Randy Dunlap
2021-01-13 21:27 ` Hinko Kocevar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).