NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/58384: amdgpu maps wrong bar for pre-bonaire chips



>Number:         58384
>Category:       kern
>Synopsis:       amdgpu maps wrong bar for pre-bonaire chips
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 01 12:05:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10
>Organization:
The NetBAR 5, no, 2, Foundation
>Environment:
>Description:
Looks like I botched a merge:

	/* Registers mapping */
	/* TODO: block userspace mapping of io register */
	if (adev->asic_type >= CHIP_BONAIRE) {
		adev->rmmio_base = pci_resource_start(adev->pdev, 5);
		adev->rmmio_size = pci_resource_len(adev->pdev, 5);
	} else {
		adev->rmmio_base = pci_resource_start(adev->pdev, 2);
		adev->rmmio_size = pci_resource_len(adev->pdev, 2);
	}

#ifdef __NetBSD__
	if (pci_mapreg_map(&adev->pdev->pd_pa, PCI_BAR(5),
		pci_mapreg_type(adev->pdev->pd_pa.pa_pc,
		    adev->pdev->pd_pa.pa_tag, PCI_BAR(5)),
		0,
		&adev->rmmiot, &adev->rmmioh,
		&adev->rmmio_base, &adev->rmmio_size))
		return -EIO;

>How-To-Repeat:
use a pre-bonaire amdgpu chip
>Fix:
use BAR 2 for pre-bonaire chips



Home | Main Index | Thread Index | Old Index