TEMU
4.4
The Terma Emulator
PCIeHelper.h
Go to the documentation of this file.
1
//===-- temu-c/PCIeHelper.h - PCIe API --------------------------*- C++ -*-===//
2
//
3
// TEMU: The Terma Emulator
4
// (c) Terma 2020
5
// Authors: Daria Vorotnikova <davo (at) terma.com>
6
//
7
//===----------------------------------------------------------------------===//
8
9
#
ifndef
TEMU_SUPPORT_PCIe_H
10
#
define
TEMU_SUPPORT_PCIe_H
11
12
//------------------------------------------------------------------------------
13
// WARNING!!! WARNING!!! EXPERIMENTAL API WARNING!!! WARNING!!! WARNING!!!
14
//
15
// BE WARNED THAT THIS API IS EXPERIMENTAL, UNSTABLE AND NOT WELL
16
// TESTED. IN PARTICULAR, ASSUME THAT DOCUMENTATION FOR THE API IS
17
// NOT UP TO DATE AND IT MAY CRASH, CAUSE DEADLOCKS OR BEHAVE BADLY IN
18
// OTHER WAYS ON OCCASIONS. FURTHER THE API IS SUBJECT TO CHANGE
19
// WITHOUT NOTICE.
20
//------------------------------------------------------------------------------
21
22
#
include
"temu-c/Support/Attributes.h"
23
#
include
"temu-c/Bus/PCIExpress.h"
24
25
#
include
<
stdint
.
h
>
26
27
#
ifdef
__cplusplus
28
extern
"C"
{
29
#
endif
30
31
/*!
32
* Write value to PCIe config to the register with given offset.
33
*
34
* \param devConf PCIe configuration
35
* \param offset register offset in memory map.
36
* \param value new value fot the register
37
*/
38
TEMU_API
void
39
temu_writePCIeConfigRegister
(
temu_PCIExpressDevice
*
devConf
,
uint32_t
offset
,
40
uint32_t
value
);
41
42
/*!
43
* Read register value from PCIe configuration
44
*
45
* \param DevConf PCIe configuration
46
* \param offset register offset in memory map.
47
*
48
* \result return register value.
49
*/
50
TEMU_API temu_Propval
51
temu_readPCIeConfigRegister(temu_PCIExpressDevice *DevConf, uint32_t offset);
52
53
TEMU_API
void
54
temu_pciExpressDeviceRegister
(
temu_Class
*
C
);
55
56
TEMU_API
void
57
temu_pciExpressBridgeRegister
(
temu_Class
*
C
);
58
59
TEMU_API
void
60
temu_pciExpressBusRegister
(
temu_Class
*
C
);
61
#
ifdef
__cplusplus
62
}
63
#
endif
64
65
#
endif
// !TEMU_SUPPORT_PCIe_H
temu_pciExpressBusRegister
TEMU_API void temu_pciExpressBusRegister(temu_Class *C)
temu_pciExpressBridgeRegister
TEMU_API void temu_pciExpressBridgeRegister(temu_Class *C)
temu_writePCIeConfigRegister
TEMU_API void temu_writePCIeConfigRegister(temu_PCIExpressDevice *devConf, uint32_t offset, uint32_t value)
temu_pciExpressDeviceRegister
TEMU_API void temu_pciExpressDeviceRegister(temu_Class *C)
temu-c
Support
PCIeHelper.h
Generated by
1.8.17