Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: HEADS UP: Merging drm update
Hi,
Taylor R Campbell <riastradh%NetBSD.org@localhost> writes:
>> Date: Tue, 21 Dec 2021 22:47:34 +0900
>> From: Ryo ONODERA <ryo%tetera.org@localhost>
>>
>> I think that "Cannot find any crtc or sizes" may be related to
>> "Failed to find VBIOS tables (VBT)".
>> I have added some printf lines to some functions invoked before
>> intel_bios_init in
>> sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c .
>>
>> And bus_space_map (line 956)
>> in intel_opregion_setup in sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c
>> failed and return value 35.
>
> Can you do the following diagnostics?
>
> 1. Print what the bus address is when bus_space_map fails here; call
> it BADADDR.
>
> 2. Add a fragment to bus_space_reserve in x86/bus_space.c:
>
> #include <ddb/ddb.h>
>
> if (bpa <= BADADDR && BADADDR < bpa + size)
> db_stacktrace();
>
> Then share the dmesg output on boot with this change to
> bus_space_reserve?
>
> This way we can track down who's reserving the registers that
> intel_opregion.c wants.
Thanks for your suggestion.
I have applied the following patch.
I cannot get dmesg easily and I have added panic() to stop vertical scroll.
Index: sys/arch/x86/x86/bus_space.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/bus_space.c,v
retrieving revision 1.46
diff -u -r1.46 bus_space.c
--- sys/arch/x86/x86/bus_space.c 7 Oct 2021 12:52:27 -0000 1.46
+++ sys/arch/x86/x86/bus_space.c 21 Dec 2021 15:41:49 -0000
@@ -51,6 +51,8 @@
#include <xen/hypervisor.h>
#endif
+#include <ddb/ddb.h>
+
/*
* Macros for sanity-checking the aligned-ness of pointers passed to
* bus space ops. These are not strictly necessary on the x86, but
@@ -251,6 +253,11 @@
bus_size_t size,
int flags, bus_space_reservation_t *bsrp)
{
+ if (bpa <= 0x63ec5018 && 0x63ec5018 < bpa + size) {
+ db_stacktrace();
+ panic("BADADDR");
+ }
+
struct extent *ex;
int error;
bus_space_tag_t it;
Index: sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c,v
retrieving revision 1.4
diff -u -r1.4 intel_opregion.c
--- sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c 19 Dec 2021 11:49:11 -0000 1.4
+++ sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c 21 Dec 2021 15:41:49 -0000
@@ -943,6 +943,7 @@
BUILD_BUG_ON(sizeof(struct opregion_asle_ext) != 0x400);
pci_read_config_dword(pdev, ASLS, &asls);
+ printf("graphic opregion physical addr: 0x%x\n", asls);
DRM_DEBUG_DRIVER("graphic opregion physical addr: 0x%x\n", asls);
if (asls == 0) {
DRM_DEBUG_DRIVER("ACPI OpRegion not supported!\n");
My result is very strange. No one except i195drmkms itself
requests asls=0x63ec5018 address.
My patch has panic() and if someone requests the address,
boot process will stop immediately.
Here is the last part of dmesg manually transcribed from photo.
(snip)
i915drmkms0 at pci0 dev 2 function 0: Intel product 8a52 (rev. 0x03)
(snip)
boot device: ld0
root file system type: ffs
kern.module.path=/stand/amd64/9.99.92/modules
graphics opregion physical addr: 0x63ec5018
bus_space_map() at netbsd:bus_space_map+0x43
intel_opregion_setup() at netbsd:intel_opregion_setup+0xa3
i915_driver_probe() at netbsd:i915_driver_probe+0x64f
i915drmkms_attach_real() at netbsd:i915drmkms_attach_real+0x40
config_mountroot_thread() at netbsd:config_mountroot_thread+0x37
panic: BADADDR
cpu0: Begin traceback...
vpanic() netbsd:vpanic+0x156
panic() at netbsd:panic+0x3c
bus_space_reserve() at netbsd:bus_space_reserve+0x104
bus_space_map() at netbsd:bus_space_map+0x43
intel_opregion_setuo() at netbsd:intel_opregion_setup+0xa3
i915_driver_probe() at netbsd:i915_driver_probe+0x64f
i915drmkms_attach_real() at netbsd:i915drmkms_attach_real+0x40
config_mountroot_thread() at netbsd:config_mountroot_thread+0x37
cpu0: End traceback...
fatal breakpoint trap insupervisor mode
trap type 1 code 0 rip 0xffffffff80221995 cs 0x8 rflags 0x202 cdr 0 ilevel 0 rsp 0xffffdd014aa69d40
curlwp 0xffffc279f4c75900 pid 0.384 lowest kstack 0xffffdd014aa652c0
Stopped in pid 0.384 (system) at netbsd:breakpoiny+0x5: leave
(snip)
I do not understand my situation yet...
--
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Home |
Main Index |
Thread Index |
Old Index