Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
a6fa9935
Commit
a6fa9935
authored
Feb 24, 2014
by
ghaddab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5083
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
9df073f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
+13
-11
No files found.
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
View file @
a6fa9935
/*
*
openair0_lib : API to interface with ExpressMIMO-1&2 kernel driver
/*
e
openair0_lib : API to interface with ExpressMIMO-1&2 kernel driver
*
* Authors: Matthias Ihmig <matthias.ihmig@mytum.de>, 2013
* Raymond Knopp <raymond.knopp@eurecom.fr>
...
...
@@ -78,16 +78,16 @@ int openair0_open(void)
}
// calculate userspace addresses
openair0_exmimo_pci
[
card
].
firmware_block_ptr
=
(
char
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
card
].
firmware_block_ptr
-
bigshm_top_kvirtptr
[
card
]);
openair0_exmimo_pci
[
card
].
printk_buffer_ptr
=
(
char
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
card
].
printk_buffer_ptr
-
bigshm_top_kvirtptr
[
card
]);
openair0_exmimo_pci
[
card
].
exmimo_config_ptr
=
(
exmimo_config_t
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
card
].
exmimo_config_ptr
-
bigshm_top_kvirtptr
[
card
]);
openair0_exmimo_pci
[
card
].
exmimo_id_ptr
=
(
exmimo_id_t
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
card
].
exmimo_id_ptr
-
bigshm_top_kvirtptr
[
card
]);
/
*
printf("openair0_exmimo_pci.firmware_block_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.firmware_block_ptr(%p) - bigshm_top_kvirtptr(%x)\n",
openair0_exmimo_pci.firmware_block_ptr, bigshm_top, exmimo_pci_kvirt.firmware_block_ptr, bigshm_top_kvirtptr
);
printf("card%d, openair0_exmimo_pci.exmimo_id_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.exmimo_id_ptr (%p) - bigshm_top_kvirtptr(%x)\n",
card, openair0_exmimo_pci[card].exmimo_id_ptr, bigshm_top[card], exmimo_pci_kvirt[card].exmimo_id_ptr, bigshm_top_kvirtptr[card]);
*/
openair0_exmimo_pci
[
card
].
firmware_block_ptr
=
(
char
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
0
].
firmware_block_ptr
-
bigshm_top_kvirtptr
[
0
]);
openair0_exmimo_pci
[
card
].
printk_buffer_ptr
=
(
char
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
0
].
printk_buffer_ptr
-
bigshm_top_kvirtptr
[
0
]);
openair0_exmimo_pci
[
card
].
exmimo_config_ptr
=
(
exmimo_config_t
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
0
].
exmimo_config_ptr
-
bigshm_top_kvirtptr
[
0
]);
openair0_exmimo_pci
[
card
].
exmimo_id_ptr
=
(
exmimo_id_t
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
0
].
exmimo_id_ptr
-
bigshm_top_kvirtptr
[
0
]);
/
/
printf("openair0_exmimo_pci.firmware_block_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.firmware_block_ptr(%p) - bigshm_top_kvirtptr(%x)\n",
// openair0_exmimo_pci[card].firmware_block_ptr, bigshm_top, exmimo_pci_kvirt[card].firmware_block_ptr, bigshm_top_kvirtptr[card]
);
//
printf("card%d, openair0_exmimo_pci.exmimo_id_ptr (%p) = bigshm_top(%p) + exmimo_pci_kvirt.exmimo_id_ptr (%p) - bigshm_top_kvirtptr(%x)\n",
//
card, openair0_exmimo_pci[card].exmimo_id_ptr, bigshm_top[card], exmimo_pci_kvirt[card].exmimo_id_ptr, bigshm_top_kvirtptr[card]);
//if (openair0_exmimo_pci[card].exmimo_id_ptr->board_swrev != BOARD_SWREV_CNTL2)
// {
// error("Software revision %d and firmware revision %d do not match, Please update either Software or Firmware",BOARD_SWREV_CNTL2,openair0_exmimo_pci[card].exmimo_id_ptr->board_swrev);
...
...
@@ -100,6 +100,7 @@ int openair0_open(void)
if
(
openair0_exmimo_pci
[
card
].
exmimo_id_ptr
->
board_exmimoversion
==
2
)
openair0_num_antennas
[
card
]
=
4
;
for
(
ant
=
0
;
ant
<
openair0_num_antennas
[
card
];
ant
++
)
{
openair0_exmimo_pci
[
card
].
rxcnt_ptr
[
ant
]
=
(
unsigned
int
*
)
(
bigshm_top
[
card
]
+
(
unsigned
int
)
exmimo_pci_kvirt
[
card
].
rxcnt_ptr
[
ant
]
-
bigshm_top_kvirtptr
[
card
]);
...
...
@@ -127,6 +128,7 @@ int openair0_open(void)
return
-
3
;
}
}
//printf("p_exmimo_config = %p, p_exmimo_id = %p\n", openair0_exmimo_pci.exmimo_config_ptr, openair0_exmimo_pci.exmimo_id_ptr);
printf
(
"card %d: ExpressMIMO %d, HW Rev %d, SW Rev 0x%d, %d antennas
\n
"
,
card
,
openair0_exmimo_pci
[
card
].
exmimo_id_ptr
->
board_exmimoversion
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment