Page MenuHomeFreeBSD

Remove special initialization for ICH8M
ClosedPublic

Authored by delphij on Nov 22 2018, 7:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 10:07 PM
Unknown Object (File)
Dec 20 2023, 6:45 AM
Unknown Object (File)
Nov 24 2023, 6:48 AM
Unknown Object (File)
Aug 7 2023, 4:24 AM
Unknown Object (File)
Aug 7 2023, 4:24 AM
Unknown Object (File)
Aug 7 2023, 4:24 AM
Unknown Object (File)
Aug 2 2023, 6:49 AM
Unknown Object (File)
Aug 2 2023, 3:00 AM
Subscribers

Details

Summary

Remove special initialization for ICH8M, rely on BIOS to properly initialize the controller.

Test Plan

test on Intel based controllers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I generally believe that we should let BIOS do its job. The chipset specification explicitly tells that OS doesn't need to know about this register. I can't recall why that code exist there and what was the problem, but since it touches only ancient ICH8M chipset, unless there is some other newer cases to have it, I'd remove it completely instead.

I am not sure there is a real reason to move this code after reset, since reset should not affect it, otherwise none of generic AHCI drivers could reset the controller.

Remove ICH8M specific initialization.

delphij retitled this revision from Force all ports active after AHCI initialization for Intel controllers. to Remove special initialization for ICH8M.Dec 10 2018, 7:22 AM
delphij edited the summary of this revision. (Show Details)

This changes does what it says, but no clue why we need it.

sys/dev/ahci/ahci_pci.c
361 ↗(On Diff #51797)

why?

This revision is now accepted and ready to land.Dec 10 2018, 6:56 PM
delphij added inline comments.
sys/dev/ahci/ahci_pci.c
361 ↗(On Diff #51797)

Because the initialization doesn't seem right. Based on the datasheet, what it does was:

If the controller was ICH8M, and if only port 2 (0x04) was enabled among all but port 1 (~0xfe), disable all port and enable port 1.

That doesn't really make sense to me, and was not found in anywhere else other than FreeBSD. (Everyone does something similar to ahci_ctrl_reset before poking enabled bits, by the way).

The alternative (previous revision) that I have proposed was to enable all ports regardless of their present state, which was done in some other operating systems. However, after talking with mav@, I was convinced that since we are not doing similar thing for so many years now and nobody complained, it's likely that an extra initialization like that was actually redundant.

This revision was automatically updated to reflect the committed changes.
delphij marked an inline comment as done.