Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
f692c71a
Commit
f692c71a
authored
Sep 16, 2020
by
Antoine Kaufmann
Browse files
i40e: PFINT_ITR0 register
parent
3e20e115
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
i40e_bm/i40e_bm.cc
i40e_bm/i40e_bm.cc
+19
-0
i40e_bm/i40e_bm.h
i40e_bm/i40e_bm.h
+2
-0
No files found.
i40e_bm/i40e_bm.cc
View file @
f692c71a
...
@@ -245,6 +245,16 @@ uint32_t i40e_bm::reg_mem_read32(uint64_t addr)
...
@@ -245,6 +245,16 @@ uint32_t i40e_bm::reg_mem_read32(uint64_t addr)
val
=
regs
.
pfint_dyn_ctl0
;
val
=
regs
.
pfint_dyn_ctl0
;
break
;
break
;
case
I40E_PFINT_ITR0
(
0
):
val
=
regs
.
pfint_itr0
[
0
];
break
;
case
I40E_PFINT_ITR0
(
1
):
val
=
regs
.
pfint_itr0
[
1
];
break
;
case
I40E_PFINT_ITR0
(
2
):
val
=
regs
.
pfint_itr0
[
2
];
break
;
case
I40E_GLPCI_CNF2
:
case
I40E_GLPCI_CNF2
:
val
=
((
NUM_PFINTS
-
2
)
<<
I40E_GLPCI_CNF2_MSI_X_PF_N_SHIFT
)
|
val
=
((
NUM_PFINTS
-
2
)
<<
I40E_GLPCI_CNF2_MSI_X_PF_N_SHIFT
)
|
(
2
<<
I40E_GLPCI_CNF2_MSI_X_VF_N_SHIFT
);
/* that is ugly,
(
2
<<
I40E_GLPCI_CNF2_MSI_X_VF_N_SHIFT
);
/* that is ugly,
...
@@ -488,6 +498,15 @@ void i40e_bm::reg_mem_write32(uint64_t addr, uint32_t val)
...
@@ -488,6 +498,15 @@ void i40e_bm::reg_mem_write32(uint64_t addr, uint32_t val)
case
I40E_PFINT_DYN_CTL0
:
case
I40E_PFINT_DYN_CTL0
:
regs
.
pfint_dyn_ctl0
=
val
;
regs
.
pfint_dyn_ctl0
=
val
;
break
;
break
;
case
I40E_PFINT_ITR0
(
0
):
regs
.
pfint_itr0
[
0
]
=
val
;
break
;
case
I40E_PFINT_ITR0
(
1
):
regs
.
pfint_itr0
[
1
]
=
val
;
break
;
case
I40E_PFINT_ITR0
(
2
):
regs
.
pfint_itr0
[
2
]
=
val
;
break
;
case
I40E_PFHMC_SDCMD
:
case
I40E_PFHMC_SDCMD
:
regs
.
pfhmc_sdcmd
=
val
;
regs
.
pfhmc_sdcmd
=
val
;
...
...
i40e_bm/i40e_bm.h
View file @
f692c71a
...
@@ -443,6 +443,7 @@ protected:
...
@@ -443,6 +443,7 @@ protected:
static
const
uint32_t
NUM_PFINTS
=
512
;
static
const
uint32_t
NUM_PFINTS
=
512
;
static
const
uint32_t
NUM_VSIS
=
384
;
static
const
uint32_t
NUM_VSIS
=
384
;
static
const
uint16_t
MAX_MTU
=
2048
;
static
const
uint16_t
MAX_MTU
=
2048
;
static
const
uint8_t
NUM_ITR
=
3
;
struct
i40e_regs
{
struct
i40e_regs
{
uint32_t
glgen_rstctl
;
uint32_t
glgen_rstctl
;
...
@@ -451,6 +452,7 @@ protected:
...
@@ -451,6 +452,7 @@ protected:
uint32_t
pfint_lnklst0
;
uint32_t
pfint_lnklst0
;
uint32_t
pfint_icr0_ena
;
uint32_t
pfint_icr0_ena
;
uint32_t
pfint_icr0
;
uint32_t
pfint_icr0
;
uint32_t
pfint_itr0
[
NUM_ITR
];
uint32_t
pfint_dyn_ctl0
;
uint32_t
pfint_dyn_ctl0
;
uint32_t
pfint_dyn_ctln
[
NUM_PFINTS
-
1
];
uint32_t
pfint_dyn_ctln
[
NUM_PFINTS
-
1
];
...
...
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