The Pedigree Project 0.1
pci.cc
1/* Copyright (c) 2026, Pedigree Developers. SPDX-License-Identifier: ISC */
2#include "pedigree/kernel/machine/PciDrivers.h"
3
4#include "modules/Module.h"
5#if !ARM64 && !ARMV7
6#include "PciePorts.h"
7#endif
8
9namespace {
10bool entry() {
11 if (!PciDrivers::initialize()) {
12 return false;
13 }
14#if !ARM64 && !ARMV7
15 PciePorts::initialize();
16#endif
17 return true;
18}
19
20void exit() {}
21} // namespace
22
23// Existing drivers require "pci" to mean discovery has completed.
24#if ARM64 || ARMV7
25MODULE_INFO_NON_UNLOADABLE("pci", &entry, &exit, "pci-enumeration");
26#else
27MODULE_INFO_NON_UNLOADABLE("pci", &entry, &exit, "chipset");
28#endif