Date: Tue, 26 Mar 2019 18:09:56 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 236513] AMD Jaguar: Only CPU core 0 detects C2 state Message-ID: <bug-236513-227-g4z2qfj5Yv@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-236513-227@https.bugs.freebsd.org/bugzilla/> References: <bug-236513-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236513 --- Comment #24 from stockhausen@collogia.de --- One step further: The wrong ACPI definitions are indeed the culprit of the wrong C2 state registration. I implemented a lousy patch in acpi.c: /* * Pre-allocate/manage all memory and IO resources. Since rman can't handle * duplicates, we merge any in the sysresource attach routine. */ static int acpi_sysres_alloc(device_t dev) { ... rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); STAILQ_FOREACH(rle, rl, link) { if (rle->res != NULL) { device_printf(dev, "duplicate resource for %jx\n", rle->start); continue; } if (rle->start == 0x40b && rle->count == 1 && rle->type == SYS_RES_IOPORT) { printf("ACPI: fake IO port range 0x40b/1 -> 0x400/32\n"); rle->start = 0x400; rle->count = 32; } So when ACPI wants to register a single port 0x40b we expand the range to 0x400-0x420. With that devinfo -rv shows: nexus0 ... acpi0 Interrupt request lines: 0x9 I/O ports: ... 0x400-0x41f ... cpu0 pnpinfo _HID=none _UID=0 at handle=\_PR_.P000 ACPI I/O ports: 0x414 acpi_perf0 acpi_throttle0 hwpstate0 cpufreq0 cpu1 pnpinfo _HID=none _UID=0 at handle=\_PR_.P001 ACPI I/O ports: 0x414 acpi_perf1 acpi_throttle1 hwpstate1 Yeah! The second and following cores can register I/O port 0x414. And finally sysctl shows all C2 states: # sysctl -a | grep cx_suppo dev.cpu.3.cx_supported: C1/1/0 C2/2/400 dev.cpu.2.cx_supported: C1/1/0 C2/2/400 dev.cpu.1.cx_supported: C1/1/0 C2/2/400 dev.cpu.0.cx_supported: C1/1/0 C2/2/400 Now I need some assistance: 1. Either patch the BIOS. But how? 2. Implement a workaround in CPU registration if port is not yet registered. But how? Thanks in advance. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236513-227-g4z2qfj5Yv>
