Message type for BUSC_PCI_GET_BAR
Change-Id: I5cb21f09a2c80473101f8da3f435e4dcc3b05491
This commit is contained in:
parent
b562831340
commit
ff905e5276
4 changed files with 31 additions and 15 deletions
|
@ -534,16 +534,16 @@ message *mp;
|
|||
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);
|
||||
|
|
|
@ -149,11 +149,6 @@
|
|||
#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
|
||||
*/
|
||||
|
|
|
@ -598,6 +598,23 @@ typedef struct {
|
|||
} 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;
|
||||
|
||||
|
@ -1233,6 +1250,8 @@ typedef struct {
|
|||
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;
|
||||
|
@ -1244,6 +1263,8 @@ typedef struct {
|
|||
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;
|
||||
|
|
|
@ -20,8 +20,8 @@ int *ioflag;
|
|||
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)
|
||||
|
@ -29,9 +29,9 @@ int *ioflag;
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue