[Bug 262638] overly strict check of hpet region size
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 262638] overly strict check of hpet region size"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Mar 2022 16:54:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262638 Mark Johnston <markj@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open CC| |markj@FreeBSD.org --- Comment #3 from Mark Johnston <markj@FreeBSD.org> --- The value of 1024 comes directly from the Intel specification, see section 2.1: https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/software-developers-hpet-spec-1-0a.pdf Some AMD documentation for 16h processors suggests that only three timers are available, and the MMIO space for HPET registers is indeed only 512 bytes in size: https://www.amd.com/system/files/TechDocs/52740_16h_Models_30h-3Fh_BKDG.pdf Changing the value of HPET_MEM_WIDTH doesn't seem like the right solution: hpet_identify() uses that constant to initialize the memory resource for the hpet driver if it can't get the resource size from acpi. We could instead modify the check in hpet_attach() to first verify that the resource is large enough to read the capabilities register, then check it again once we have the number of timers. -- You are receiving this mail because: You are the assignee for the bug.