Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9fc85493
authored
Nov 08, 2015
by
triazo
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Removed unused functions
parent
a271cfba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
42 deletions
src/pci.c
src/pci.c
View file @
9fc85493
...
...
@@ -42,48 +42,6 @@ uint32_t pciConfigReadWord(uint8_t bus, uint8_t slot, uint8_t func, uint8_t offs
return
data
;
}
// Check function also prints out stuff
void
checkFunction
(
uint8_t
bus
,
uint8_t
device
,
uint8_t
function
)
{
uint16_t
class
;
class
=
pciConfigReadWord
(
bus
,
device
,
function
,
0x08
);
// Print out information about the device
serial_writestring
(
"0x"
);
serial_hexhword
(
class
);
}
void
checkDevice
(
uint8_t
bus
,
uint8_t
device
)
{
uint8_t
function
=
0
;
uint16_t
vendorID
=
pciConfigReadWord
(
bus
,
device
,
function
,
2
);
if
(
vendorID
==
0xFFFF
)
{
return
;
}
checkFunction
(
bus
,
device
,
function
);
uint8_t
headerType
=
(
pciConfigReadWord
(
bus
,
device
,
function
,
0x0C
)
&
0xff00
)
>>
8
;
/* serial_writestring("Header type: "); */
/* serial_hexhword(pciConfigReadWord(bus, device, function, 0x0C)); */
/* serial_writestring("\n"); */
if
(
(
headerType
&
0x80
)
!=
0
)
{
// It is a multi-function device, so check remaining functions
for
(
function
=
0
;
function
<
8
;
function
++
)
{
serial_writestring
(
"found a function
\n
"
);
if
(
pciConfigReadWord
(
bus
,
device
,
function
,
0
)
!=
0x0000FFFF
)
{
checkFunction
(
bus
,
device
,
function
);
}
}
}
}
void
checkAllBuses
(
void
)
{
serial_writestring
(
"Enumerating PCI busses
\n
"
);
...
...
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