blob: 31d1e86c8ffd72ac15cd6d289910682d70e2615f [file] [log] [blame]
Anastasia Klimchuk340b20f2021-04-27 16:13:32 +10001/*
2 * This file is part of the flashrom project.
3 *
4 * Copyright (C) 2009 Carl-Daniel Hailfinger
Thomas Heijligen4c39c432022-01-20 16:45:14 +01005 * Copyright (C) 2022 secunet Security Networks AG
6 * (Written by Thomas Heijligen <thomas.heijligen@secunet.com)
Anastasia Klimchuk340b20f2021-04-27 16:13:32 +10007 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
Thomas Heijligen4c39c432022-01-20 16:45:14 +010018/*
19 * This file contains prototypes for x86 I/O Port access.
20 */
21
Anastasia Klimchuk340b20f2021-04-27 16:13:32 +100022#ifndef __HWACCESS_X86_IO_H__
23#define __HWACCESS_X86_IO_H__ 1
24
Thomas Heijligen4c39c432022-01-20 16:45:14 +010025#include <stdint.h>
26/**
27 */
Thomas Heijligena0655202021-12-14 16:36:05 +010028int rget_io_perms(void);
29
Thomas Heijligen4c39c432022-01-20 16:45:14 +010030void OUTB(uint8_t value, uint16_t port);
31void OUTW(uint16_t value, uint16_t port);
32void OUTL(uint32_t value, uint16_t port);
33uint8_t INB(uint16_t port);
34uint16_t INW(uint16_t port);
35uint32_t INL(uint16_t port);
Anastasia Klimchuk340b20f2021-04-27 16:13:32 +100036
37#endif /* __HWACCESS_X86_IO_H__ */