blob: 90ed9e5cee49963925038aaa19bb517f9606fbb1 [file] [log] [blame]
Nico Huberef4545a2017-06-18 02:58:40 +02001--
2-- Copyright (C) 2017 Nico Huber <nico.h@gmx.de>
3--
4-- This program is free software; you can redistribute it and/or modify
5-- it under the terms of the GNU General Public License as published by
6-- the Free Software Foundation; either version 2 of the License, or
7-- (at your option) any later version.
8--
9-- This program is distributed in the hope that it will be useful,
10-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-- GNU General Public License for more details.
13--
14
15generic
16 Dev : PCI.Address := (0, 0, 0);
17package HW.PCI.Dev
18with
19 Abstract_State => (Address_State, (PCI_State with External)),
20 Initializes => Address_State
21is
22
23 procedure Read8 (Value : out Word8; Offset : Index);
24 procedure Read16 (Value : out Word16; Offset : Index)
25 with
26 Pre => Offset mod 2 = 0;
27 procedure Read32 (Value : out Word32; Offset : Index)
28 with
29 Pre => Offset mod 4 = 0;
30
31 procedure Write8 (Offset : Index; Value : Word8);
32 procedure Write16 (Offset : Index; Value : Word16)
33 with
34 Pre => Offset mod 2 = 0;
35 procedure Write32 (Offset : Index; Value : Word32)
36 with
37 Pre => Offset mod 4 = 0;
38
Nico Huberae9b8552017-07-09 15:25:41 +020039 pragma Warnings (GNATprove, Off, "unused variable ""WC""*",
40 Reason => "Used for a common interface");
Nico Huberef4545a2017-06-18 02:58:40 +020041 procedure Map
42 (Addr : out Word64;
43 Res : in Resource;
44 Length : in Natural := 0;
45 Offset : in Natural := 0;
46 WC : in Boolean := False);
Nico Huberae9b8552017-07-09 15:25:41 +020047 pragma Warnings (GNATprove, On, "unused variable ""WC""*");
Nico Huberef4545a2017-06-18 02:58:40 +020048
49 procedure Resource_Size (Length : out Natural; Res : Resource);
50
51 procedure Initialize (Success : out Boolean; MMConf_Base : Word64 := 0);
52
53end HW.PCI.Dev;