xref: /freebsd/sys/dev/sram/mmio_sram_if.m (revision d0b2dbfa)
1#-
2# SPDX-License-Identifier: BSD-2-Clause
3#
4# Copyright (c) 2022 Ruslan Bukin <br@bsdpad.com>
5#
6# This work was supported by Innovate UK project 105694, "Digital Security by
7# Design (DSbD) Technology Platform Prototype".
8#
9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions are met:
11# 1. Redistributions of source code must retain the above copyright notice,
12#    this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright notice,
14#    this list of conditions and the following disclaimer in the documentation
15#    and/or other materials provided with the distribution.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
18# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
21# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28#
29
30#include <machine/bus.h>
31
32INTERFACE mmio_sram;
33
34METHOD uint8_t read_1 {
35	device_t		dev;
36	bus_size_t		offset;
37};
38
39METHOD void write_1 {
40	device_t		dev;
41	bus_size_t		offset;
42	uint8_t			value;
43};
44