Commit c4b325e
committed
Replace BAR flags with unified
This change updates pci_set_bar() to accept a single `layout` bitmask
instead of separate boolean flags, simplifying BAR configuration. The
new `layout` argument encodes I/O vs. memory space, 32-/64-bit decoding,
and prefetchable settings via standard PCI_BASE_ADDRESS_* macros.
Existing callers can now pass any combination of:
- PCI_BASE_ADDRESS_SPACE_IO or PCI_BASE_ADDRESS_SPACE_MEMORY
- PCI_BASE_ADDRESS_MEM_TYPE_32 or PCI_BASE_ADDRESS_MEM_TYPE_64
- PCI_BASE_ADDRESS_MEM_PREFETCH
The function writes the full layout to the BAR, derives `bar_is_io_space`
from bit[0], and initializes the region with the provided callback.
Docstrings updated with Doxygen examples illustrating MMIO and port I/O.
BREAKING CHANGE: pci_set_bar() signature changed; call sites must be
updated to pass the new `layout` parameter rather than separate flags.layout parameter1 parent 93f1fee commit c4b325e
3 files changed
+36
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | 151 | | |
153 | | - | |
| 152 | + | |
154 | 153 | | |
155 | | - | |
| 154 | + | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
49 | 78 | | |
50 | 79 | | |
51 | 80 | | |
52 | | - | |
| 81 | + | |
53 | 82 | | |
54 | 83 | | |
55 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| |||
0 commit comments