On 3/8/2026 5:35 PM, [email protected] wrote:
diff --git a/pc-bios/s390-ccw/pci.h b/pc-bios/s390-ccw/pci.h new file mode 100644 index 0000000000..40a0bf9dcb --- /dev/null +++ b/pc-bios/s390-ccw/pci.h @@ -0,0 +1,39 @@ +/* + * s390x PCI definitions + * + * Copyright 2025 IBM Corp. + * Author(s): Jared Rossi<[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef PCI_H +#define PCI_H + +#include <stdint.h> +#include <stdbool.h> +#include "clp.h" + +#define ZPCI_CREATE_REQ(handle, space, len) \ + ((uint64_t) handle << 32 | space << 16 | len) + +union register_pair { + unsigned __int128 pair; + struct { + unsigned long even; + unsigned long odd; + }; +}; + +#define PCIST_DISABLED 0x0 +#define PCIST_ENABLED 0x1
Where are we using these #defines? I couldn't find it in the code. So maybe we should remove them? Apart from this the patch looks good to me.
Reviewed-by: Farhan Ali<[email protected]> Thanks Farhan
+ +#define PCI_CFGBAR 0xF /* Base Address Register for config space */ +#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ + +int pci_write(uint32_t fhandle, uint64_t offset, uint8_t pcias, uint64_t data, + uint8_t len); +int pci_read(uint32_t fhandle, uint64_t offset, uint8_t pcias, void *buf, + uint8_t len); + +#endif
