Changeset 832cbe7 in mainline for uspace/drv/bus/pci/pciintel/pci.h


Ignore:
Timestamp:
2025-02-05T12:30:20Z (7 days ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
accdf882
Parents:
0dab4850
git-author:
Jiri Svoboda <jiri@…> (2025-02-04 21:30:06)
git-committer:
Jiri Svoboda <jiri@…> (2025-02-05 12:30:20)
Message:

Add proper IDE PCI to ISA fallback mechanism.

To determine if legacy IDE I/O ports are free, isa-ide asks isa,
who asks pciintel. pciintel waits for bus enumeration to complete,
then waits for all functions except the one who is asking
(which is ISA bus) to stabilize. During attach pci-ide will claim
the legacy IDE ports. Thus, if at this point legacy IDE ports
are unclaimed, pciintel tells ISA they are free, which tells isa-ide,
which continues to attach. If they are not free, isa-ide will not
attach.

This works for all use cases, including system without PCI bus,
system with PCI bus, but no (or disabled) PCI IDE, system with PCI
IDE with unrecognized VID/PID (which we will handle in legacy ISA mode).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.h

    r0dab4850 r832cbe7  
    11/*
     2 * Copyright (c) 2025 Jiri Svoboda
    23 * Copyright (c) 2010 Lenka Trochtova
    3  * Copyright (c) 2011 Jiri Svoboda
    44 * All rights reserved.
    55 *
     
    4141#include <ddf/driver.h>
    4242#include <fibril_synch.h>
     43#include <stdbool.h>
    4344
    4445#define PCI_MAX_HW_RES 10
     
    5455        /** List of functions (of pci_fun_t) */
    5556        list_t funs;
     57        /** Enumeration is done */
     58        bool enum_done;
     59        /** Synchronize enum_done */
     60        fibril_mutex_t enum_done_lock;
     61        /** Signal change to enum_done */
     62        fibril_condvar_t enum_done_cv;
     63        /** @c true iff legacy IDE range is claimed by PCI IDE driver */
     64        bool leg_ide_claimed;
    5665} pci_bus_t;
    5766
     
    7281        uint8_t prog_if;
    7382        uint8_t revision;
     83        bool querying;
    7484        hw_resource_list_t hw_resources;
    7585        hw_resource_t resources[PCI_MAX_HW_RES];
Note: See TracChangeset for help on using the changeset viewer.