aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/doc/opal-api/opal-pci-map-pe-mmio-window-29.rst
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/doc/opal-api/opal-pci-map-pe-mmio-window-29.rst
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/doc/opal-api/opal-pci-map-pe-mmio-window-29.rst')
-rw-r--r--roms/skiboot/doc/opal-api/opal-pci-map-pe-mmio-window-29.rst53
1 files changed, 53 insertions, 0 deletions
diff --git a/roms/skiboot/doc/opal-api/opal-pci-map-pe-mmio-window-29.rst b/roms/skiboot/doc/opal-api/opal-pci-map-pe-mmio-window-29.rst
new file mode 100644
index 000000000..a84da18dd
--- /dev/null
+++ b/roms/skiboot/doc/opal-api/opal-pci-map-pe-mmio-window-29.rst
@@ -0,0 +1,53 @@
+.. _OPAL_PCI_MAP_PE_MMIO_WINDOW:
+
+OPAL_PCI_MAP_PE_MMIO_WINDOW
+===========================
+
+.. code-block:: c
+
+ #define OPAL_PCI_MAP_PE_MMIO_WINDOW 29
+
+ int64_t opal_pci_map_pe_mmio_window(uint64_t phb_id,
+ uint64_t pe_number,
+ uint16_t window_type,
+ uint16_t window_num,
+ uint16_t segment_num);
+
+.. note:: Appears to be POWER7 p7ioc specific. Likely to be removed soon.
+
+**WARNING:** following documentation is from old sources, and is possibly
+not representative of OPALv3 as implemented by skiboot. This should be
+used as a starting point for full documentation.
+
+The host calls this function to map a segment of MMIO address space to a PE.
+
+``phb_id``
+ is the value from the PHB node ibm,opal-phbid property.
+
+``window_type``
+ specifies 32-bit or 64-bit PCI memory
+
+ '0' selects PCI IO Space. ibm,opal-ioda2 PHBs do not support IO space,
+ and OPAL returns opal_unsupported if called for IO windows.
+
+ '1' selects 32-bit PCI memory space
+
+ '2' selects 64 bit PCI memory space
+
+``window_num``
+ is the MMIO window number within the specified PCI memory space
+
+``segment_num``
+ is an index from 0 to the number of segments minus 1 defined
+ or this window, and selects a particular segment within the specified
+ window.
+
+
+Return value:
+
+.. code-block:: c
+
+ if (!phb)
+ return OPAL_PARAMETER;
+ if (!phb->ops->map_pe_mmio_window)
+ return OPAL_UNSUPPORTED;