blob: 7a3777d8dad308a44c94ebbfcbc4a1332c7fa0a8 [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
15with System;
Nico Huber61f72872020-06-10 15:53:35 +020016with HW.Config;
Nico Huberef4545a2017-06-18 02:58:40 +020017with HW.MMIO_Range;
18
19pragma Elaborate_All (HW.MMIO_Range);
20
Nico Huber637f2a42018-05-15 23:40:30 +020021generic
Nico Huberef4545a2017-06-18 02:58:40 +020022 Dev : Address := (0, 0, 0);
Nico Huber61f72872020-06-10 15:53:35 +020023 MMConf_Base : Word64 := Config.Default_MMConf_Base;
Nico Huberef4545a2017-06-18 02:58:40 +020024package HW.PCI.MMConf
25with
26 Abstract_State => (Address_State, (PCI_State with External)),
27 Initializes => Address_State
28is
29
30 procedure Read8 (Value : out Word8; Offset : Index);
31 procedure Read16 (Value : out Word16; Offset : Index)
32 with
33 Pre => Offset mod 2 = 0;
34 procedure Read32 (Value : out Word32; Offset : Index)
35 with
36 Pre => Offset mod 4 = 0;
37
38 procedure Write8 (Offset : Index; Value : Word8);
39 procedure Write16 (Offset : Index; Value : Word16)
40 with
41 Pre => Offset mod 2 = 0;
42 procedure Write32 (Offset : Index; Value : Word32)
43 with
44 Pre => Offset mod 4 = 0;
45
46 procedure Set_Base_Address (Base : Word64);
47
48end HW.PCI.MMConf;