Bug 207677

Summary: atrtc Warning: Couldn't map I/O on Skylake Supermicro X11SSH-LN4F
Product: Base System Reporter: Will Green <will>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: admin, amd64, dev, ian, jamie, jlduran, matthieu.o.vachon, mnd999, phk, robbelics, silvanburch, software-freebsd, spam+bugs.freebsd.org, tod.jackson, valery
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
dmesg.boot from X11SSH-LN4F.
none
11.0-CURRENT dmesg.boot from X11SSH-LN4F. none

Description Will Green 2016-03-03 12:39:00 UTC
Created attachment 167682 [details]
dmesg.boot from X11SSH-LN4F.

I'm testing a new Skylake server based on the Supermicro X11SSH-LN4F motherboard.

When booting I see the following atrtc warning:

FreeBSD 10.3-BETA3 #0 r296074: Fri Feb 26 01:13:37 UTC 2016
    root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz (2904.14-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x506e3  Family=0x6  Model=0x5e  Stepping=3
...
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 24000000 Hz quality 950
Event timer "HPET" frequency 24000000 Hz quality 550
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
...

I have attached the full boot dmesg for reference.

Kernel timer info:
# sysctl kern.eventtimer
kern.eventtimer.periodic: 0
kern.eventtimer.timer: LAPIC
kern.eventtimer.idletick: 0
kern.eventtimer.singlemul: 2
kern.eventtimer.choice: LAPIC(600) HPET(550) i8254(100) RTC(0)
kern.eventtimer.et.i8254.quality: 100
kern.eventtimer.et.i8254.frequency: 1193182
kern.eventtimer.et.i8254.flags: 1
kern.eventtimer.et.RTC.quality: 0
kern.eventtimer.et.RTC.frequency: 32768
kern.eventtimer.et.RTC.flags: 17
kern.eventtimer.et.HPET.quality: 550
kern.eventtimer.et.HPET.frequency: 24000000
kern.eventtimer.et.HPET.flags: 7
kern.eventtimer.et.LAPIC.quality: 600
kern.eventtimer.et.LAPIC.frequency: 12000594
kern.eventtimer.et.LAPIC.flags: 7

PS. I have assigned this to 10.3-BETA2 because 10.3-BETA3 was not in the version list.
Comment 1 Will Green 2016-03-29 16:03:54 UTC
I have confirmed this also occurs in 11-Current (built from FreeBSD-11.0-CURRENT-amd64-20160308-r296485-memstick.img):

atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.

I will attach the full dmesg.boot for 11.0-CURRENT.
Comment 2 Will Green 2016-03-29 16:04:33 UTC
Created attachment 168761 [details]
11.0-CURRENT dmesg.boot from X11SSH-LN4F.
Comment 3 Mark Dixon 2016-03-29 21:54:20 UTC
I got this too, Skylake Desktop - 10.3-RELEASE

atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
Comment 4 Olivier - interfaSys sàrl 2016-05-22 10:34:55 UTC
Same "problem" on Braswell

CPU: Intel(R) Celeron(R) CPU  N3150  @ 1.60GHz (1600.05-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406c3  Family=0x6  Model=0x4c  Stepping=3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x43d8e3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x101<LAHF,Prefetch>
  Structured Extended Features=0x2282<TSCADJ,SMEP,ERMS,NFPUSG>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
...
atrtc0: <AT realtime clock> port 0x70-0x77 on acpi0
atrtc0: Warning: Couldn't map I/O.
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
Comment 5 Silvan Burch 2016-05-23 16:01:04 UTC
same here:

atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0                       
atrtc0: Warning: Couldn't map I/O.

on a ASRock Rack C236 WSI
Intel i3-6100
FreeNAS 9.10

Since it seems the post kinda died, I wrote Will Green directly and he told me there was no solution yet.

Anyone else found something?
Comment 6 Silvan Burch 2016-05-31 13:03:43 UTC
well I'll try to push one more time ... hope anyone has an idea?

Thanks and best regards
Comment 7 Rob Belics 2017-10-16 17:11:57 UTC
I don't know how long this has been going on but I just noticed this same warning on my Gigabyte motherboard with FreeBSD 11.1-RELEASE-p1
Comment 8 Ian Lepore freebsd_committer freebsd_triage 2017-10-23 22:42:00 UTC
It should be noted that this is a warning that doesn't affect the operation of the system or the realtime clock in any way.  I'm not sure why the code is checking for failure to map IO ports when it doesn't use the result of mapping anyway, but I just wanted to note that I've examined the code enough to see that this isn't indicating any real problem.
Comment 9 Poul-Henning Kamp freebsd_committer freebsd_triage 2021-10-03 17:04:17 UTC
pstef@ ping'ed me on this one.

I have nothing much to add over the comment I put in atrtc_attach() in the original commit (294643529963), but which has subsequently been lost:

       /*
        * Not that we need them or anything, but grab our resources
        * so they show up, correctly attributed, in the big picture.
        */

I wanted to make the RTC resources show up in the accounting, for instance devinfo -rv

For what it is worth, I get the warning also on my laptop (T480):

    atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
    atrtc0: Warning: Couldn't map I/O.
    atrtc0: registered as a time-of-day clock, resolution 1.000000s

I suspect the reason for the message is that acpi0 already claimed some of those ports:

  acpi0
      Interrupt request lines:
          0x9
      I/O ports:
          […]
          0x70
          0x72-0x77
          […]

I guess, if somebody want to fix this, the ATRTC needs to be picked up through ACPI rather than PNP ?
Comment 10 Vladyslav V. Prodan 2022-11-10 00:06:07 UTC
Up.

FreeBSD 12.4-STABLE a841c0c24 SUPPORT-12-3-0  amd64
CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (3600.15-MHz K8-class CPU)
Motherboard: FUJITSU D3401-H2

...
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 24000000 Hz quality 950
Event timer "HPET" frequency 24000000 Hz quality 550
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
...

# sysctl kern.eventtimer
kern.eventtimer.periodic: 0
kern.eventtimer.timer: LAPIC
kern.eventtimer.idletick: 0
kern.eventtimer.singlemul: 2
kern.eventtimer.choice: LAPIC(600) HPET(550) i8254(100) RTC(0)
kern.eventtimer.et.i8254.quality: 100
kern.eventtimer.et.i8254.frequency: 1193182
kern.eventtimer.et.i8254.flags: 1
kern.eventtimer.et.RTC.quality: 0
kern.eventtimer.et.RTC.frequency: 32768
kern.eventtimer.et.RTC.flags: 17
kern.eventtimer.et.HPET.quality: 550
kern.eventtimer.et.HPET.frequency: 24000000
kern.eventtimer.et.HPET.flags: 7
kern.eventtimer.et.LAPIC.quality: 600
kern.eventtimer.et.LAPIC.frequency: 3600153594
kern.eventtimer.et.LAPIC.flags: 7