source: soft/giet_vm/giet_drivers/iob_driver.h @ 298

Last change on this file since 298 was 298, checked in by alain, 10 years ago

Introducing pic driver and rdk driver

File size: 2.9 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////
2// File     : iob_driver.h
3// Date     : 01/11/2013
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _GIET_IOB_DRIVER_H_
9#define _GIET_IOB_DRIVER_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12// vci_io_bridge : registers offsets and iommu error codes
13///////////////////////////////////////////////////////////////////////////////////
14
15enum IOB_registers
16{
17    IOB_IOMMU_PTPR       = 0,      // R/W : Page Table Pointer Register
18    IOB_IOMMU_ACTIVE     = 1,      // R/W : IOMMU activated if not 0
19    IOB_IOMMU_BVAR       = 2,      // R   : Bad Virtual Address (unmapped)
20    IOB_IOMMU_ETR        = 3,      // R   : Error Type
21    IOB_IOMMU_BAD_ID     = 4,      // R   : Faulty Peripheral Index (SRCID)
22    IOB_INVAL_PTE        = 5,      // W   : Invalidate a PTE (virtual address)
23    IOB_WTI_ENABLE       = 6,      // R/W : Enable WTIs (both IOMMU and peripherals)
24    IOB_WTI_ADDR_LO      = 7,      // W/R : 32 LSB bits for IOMMU WTI
25    IOB_WTI_ADDR_HI      = 8,      // W/R : 32 MSB bits for IOMMU WTI
26    IOB_XICU_BASE        = 9,      // R/W : XICU pbase address in cluster 0
27    IOB_XICU_SIZE        = 10,     // R/W : XICU segment size
28};
29
30enum mmu_error_type_e
31{
32    MMU_NONE                      = 0x0000, // None
33    MMU_WRITE_ACCES_VIOLATION     = 0x0008, // Write access to a non writable page
34    MMU_WRITE_PT1_ILLEGAL_ACCESS  = 0x0040, // Write Bus Error accessing Table 1       
35    MMU_READ_PT1_UNMAPPED             = 0x1001, // Read  Page fault on Page Table 1     
36    MMU_READ_PT2_UNMAPPED             = 0x1002, // Read  Page fault on Page Table 2 
37    MMU_READ_PT1_ILLEGAL_ACCESS   = 0x1040, // Read  Bus Error in Table1 access     
38    MMU_READ_PT2_ILLEGAL_ACCESS   = 0x1080, // Read  Bus Error in Table2 access         
39    MMU_READ_DATA_ILLEGAL_ACCESS  = 0x1100, // Read  Bus Error in cache access
40};
41
42
43///////////////////////////////////////////////////////////////////////////////////
44// TSAR IOB access functions
45///////////////////////////////////////////////////////////////////////////////////
46
47extern void _iob_inval_tlb_entry( unsigned int cluster_xy,
48                                  unsigned int vaddr );
49
50extern void _iob_set_iommu_ptpr(  unsigned int cluster_xy,
51                                  unsigned int value );
52
53extern void _iob_set_xicu_base(   unsigned int cluster_xy,
54                                  unsigned int value );
55
56extern void _iob_set_xicu_size(   unsigned int cluster_xy,
57                                  unsigned int value );
58
59///////////////////////////////////////////////////////////////////////////////////
60
61#endif
62
63// Local Variables:
64// tab-width: 4
65// c-basic-offset: 4
66// c-file-offsets:((innamespace . 0)(inline-open . 0))
67// indent-tabs-mode: nil
68// End:
69// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
70
Note: See TracBrowser for help on using the repository browser.