WKern
Loading...
Searching...
No Matches
pci.h
Go to the documentation of this file.
1
2
/*
3
WKern - A Bare Metal OS / Kernel I am making (For Fun)
4
Copyright (C) 2025 Wdboyes13
5
6
This program is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <https://www.gnu.org/licenses/>.
18
*/
19
#pragma once
20
#include <
types/nums.h
>
21
22
#define PCI_INTERRUPT_LINE 0x3C
23
24
extern
u32
bar0
;
25
extern
u8
virtio_bus
;
26
extern
u8
virtio_slot
;
27
extern
u8
virtio_func
;
28
extern
u8
virtio_irq
;
29
30
u32
FindVirtionetDev
();
31
u32
PciConfigRead
(
u8
bus,
u8
slot,
u8
func,
u8
offset);
nums.h
u32
unsigned int u32
32-Bit Unsigned Int
Definition
nums.h:30
u8
unsigned char u8
8-Bit Unsigned Int
Definition
nums.h:32
virtio_slot
u8 virtio_slot
Definition
scconfig.c:27
virtio_bus
u8 virtio_bus
Definition
scconfig.c:26
bar0
u32 bar0
Definition
scconfig.c:30
virtio_irq
u8 virtio_irq
Definition
scconfig.c:25
FindVirtionetDev
u32 FindVirtionetDev()
Search for VirtNet Device.
Definition
scconfig.c:59
virtio_func
u8 virtio_func
Definition
scconfig.c:28
PciConfigRead
u32 PciConfigRead(u8 bus, u8 slot, u8 func, u8 offset)
Reads a 32-bit value from PCI configuration space.
Definition
scconfig.c:48
src
pci
pci.h
Generated on
for WKern by
1.14.0