tephaner.labo.int> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: ICTDCCEXCH002.one.local (10.180.4.2) To ICTDCCEXCH002.one.local (10.180.4.2) X-DKIM-Signer: DkimX (v3.60.360) X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.994]; DMARC_POLICY_ALLOW(-0.50)[stormshield.eu,quarantine]; R_SPF_ALLOW(-0.20)[+a:mail.stormshield.eu]; R_DKIM_ALLOW(-0.20)[stormshield.eu:s=signer2]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:49068, ipnet:91.212.116.0/24, country:FR]; MLMMJ_DEST(0.00)[hackers@freebsd.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[stormshield.eu:+] X-Rspamd-Queue-Id: 4XFTlX6wVMz4kgs X-Spamd-Bar: --- Hi Hackers, I have a board running 14.1 with the following warning reported by atrtc(4): atrtc0: Warning: Couldn't map I/O. It seems to comes from atrtc_attach: sc->port_res =3D bus_alloc_resource(dev, SYS_RES_IOPORT,=20 &sc->port_rid, IO_RTC, IO_RTC + 1, 2, RF_ACTIVE); if (sc->port_res =3D=3D NULL) device_printf(dev, "Warning: Couldn't map I/O.\n"); What puzzle me a bit is that: - nobody seems to use sc->port_res - and IO_RTC (0x70) is manipulated directly via outb/inb instead of bus_write/bus_read, thus ignoring the failure of bus_alloc_resource. But what puzzle me more is that bootverbose show that ACPI expose an I/O port range (type 4) containing 0x70: pcib0: port 0xcf8-0xcff on acpi0 pcib0: decoding 5 range 0-0xfe pcib0: decoding 4 range 0-0xcf7 pcib0: decoding 4 range 0xd00-0xffff pcib0: decoding 3 range 0xa0000-0xbffff pcib0: decoding 3 range 0xe0000-0xe3fff pcib0: decoding 3 range 0xe4000-0xe7fff pcib0: decoding 3 range 0xe8000-0xebfff pcib0: decoding 3 range 0xec000-0xeffff pcib0: decoding 3 range 0xf0000-0xfffff pcib0: decoding 3 range 0x80000000-0xbfffffff pcib0: decoding 3 range 0x4000000000-0x7fffffffff and nobody reclaim it: pcib0: allocated type 4 (0xefa0-0xefbf) for rid 20 of=20 pci0:0:31:4 pcib0: allocated type 4 (0x2e-0x2f) for rid 0 of superio0 pcib0: allocated type 4 (0x4e-0x4f) for rid 0 of superio1 pcib0: allocated type 4 (0x2e-0x2f) for rid 0 of superio0 pcib0: allocated type 4 (0x60-0x60) for rid 0 of atkbdc0 pcib0: allocated type 4 (0x64-0x64) for rid 1 of atkbdc0 So what could explain bus_alloc_resource's failure then? And can it be a real problem as atrtc stubbornly use the port. Regards, --=20 St=C3=A9phane Rochoy O: Stormshield