int r, devind, port, ioflag;
u32_t base, size;
- devind= mp->BUSC_PGB_DEVIND;
- port= mp->BUSC_PGB_PORT;
+ devind= mp->m_lsys_pci_busc_get_bar.devind;
+ port= mp->m_lsys_pci_busc_get_bar.port;
mp->m_type= pci_get_bar_s(devind, port, &base, &size, &ioflag);
if (mp->m_type == OK)
{
- mp->BUSC_PGB_BASE= base;
- mp->BUSC_PGB_SIZE= size;
- mp->BUSC_PGB_IOFLAG= ioflag;
+ mp->m_pci_lsys_busc_get_bar.base= base;
+ mp->m_pci_lsys_busc_get_bar.size= size;
+ mp->m_pci_lsys_busc_get_bar.flags= ioflag;
}
r= ipc_send(mp->m_source, mp);
#define BUSC_PCI_GET_BAR (BUSC_RQ_BASE + 19) /* Get Base Address
* Register properties
*/
-#define BUSC_PGB_DEVIND m2_i1 /* device index */
-#define BUSC_PGB_PORT m2_i2 /* port (BAR offset) */
-#define BUSC_PGB_BASE m2_l1 /* BAR base address */
-#define BUSC_PGB_SIZE m2_l2 /* BAR size */
-#define BUSC_PGB_IOFLAG m2_i1 /* I/O space? */
#define IOMMU_MAP (BUSC_RQ_BASE + 32) /* Ask IOMMU to map
* a segment of memory
*/
} mess_lsys_krn_schedctl;
_ASSERT_MSG_SIZE(mess_lsys_krn_schedctl);
+typedef struct {
+ int devind;
+ int port;
+
+ uint8_t padding[48];
+} mess_lsys_pci_busc_get_bar;
+_ASSERT_MSG_SIZE(mess_lsys_pci_busc_get_bar);
+
+typedef struct {
+ int base;
+ size_t size;
+ uint32_t flags;
+
+ uint8_t padding[44];
+} mess_pci_lsys_busc_get_bar;
+_ASSERT_MSG_SIZE(mess_pci_lsys_busc_get_bar);
+
typedef struct {
endpoint_t endpt;
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
mess_lsys_krn_schedule m_lsys_krn_schedule;
+ mess_lsys_pci_busc_get_bar m_lsys_pci_busc_get_bar;
+
mess_lsys_pm_getepinfo m_lsys_pm_getepinfo;
mess_lsys_pm_getprocnr m_lsys_pm_getprocnr;
mess_lsys_pm_srv_fork m_lsys_pm_srv_fork;
mess_lsys_vfs_copyfd m_lsys_vfs_copyfd;
mess_lsys_vfs_mapdriver m_lsys_vfs_mapdriver;
+ mess_pci_lsys_busc_get_bar m_pci_lsys_busc_get_bar;
+
mess_pm_lexec_exec_new m_pm_lexec_exec_new;
mess_pm_lc_getgid m_pm_lc_getgid;
message m;
m.m_type= BUSC_PCI_GET_BAR;
- m.BUSC_PGB_DEVIND= devind;
- m.BUSC_PGB_PORT= port;
+ m.m_lsys_pci_busc_get_bar.devind = devind;
+ m.m_lsys_pci_busc_get_bar.port = port;
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
if (m.m_type == 0)
{
- *base= m.BUSC_PGB_BASE;
- *size= m.BUSC_PGB_SIZE;
- *ioflag= m.BUSC_PGB_IOFLAG;
+ *base= m.m_pci_lsys_busc_get_bar.base;
+ *size= m.m_pci_lsys_busc_get_bar.size;
+ *ioflag= m.m_pci_lsys_busc_get_bar.flags;
}
return m.m_type;
}