root/src/add-ons/kernel/busses/pci/x86/PCI_x86.h
/*
 * Copyright 2022-2026, Haiku, Inc. All rights reserved.
 * Distributed under the terms of the MIT License.
 */
#ifndef PCI_X86_H
#define PCI_X86_H


#include <SupportDefs.h>


#define PCI_MECH1_REQ_PORT                              0xCF8
#define PCI_MECH1_DATA_PORT                     0xCFC
#define PCI_MECH1_REQ_DATA(bus, device, func, offset) \
        (0x80000000 | (bus << 16) | (device << 11) | (func << 8) | (offset & ~3))


#define PCI_MECH2_ENABLE_PORT                   0x0cf8
#define PCI_MECH2_FORWARD_PORT                  0x0cfa
#define PCI_MECH2_CONFIG_PORT(dev, offset) \
        (uint16)(0xC00 | (dev << 8) | offset)


#endif  // PCI_X86_H