Anastasia Klimchuk | 340b20f | 2021-04-27 16:13:32 +1000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the flashrom project. |
| 3 | * |
| 4 | * Copyright (C) 2009 Carl-Daniel Hailfinger |
Thomas Heijligen | 4c39c43 | 2022-01-20 16:45:14 +0100 | [diff] [blame^] | 5 | * Copyright (C) 2022 secunet Security Networks AG |
| 6 | * (Written by Thomas Heijligen <thomas.heijligen@secunet.com) |
Anastasia Klimchuk | 340b20f | 2021-04-27 16:13:32 +1000 | [diff] [blame] | 7 | * |
| 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 Heijligen | 4c39c43 | 2022-01-20 16:45:14 +0100 | [diff] [blame^] | 18 | /* |
| 19 | * This file contains prototypes for x86 I/O Port access. |
| 20 | */ |
| 21 | |
Anastasia Klimchuk | 340b20f | 2021-04-27 16:13:32 +1000 | [diff] [blame] | 22 | #ifndef __HWACCESS_X86_IO_H__ |
| 23 | #define __HWACCESS_X86_IO_H__ 1 |
| 24 | |
Thomas Heijligen | 4c39c43 | 2022-01-20 16:45:14 +0100 | [diff] [blame^] | 25 | #include <stdint.h> |
| 26 | /** |
| 27 | */ |
Thomas Heijligen | a065520 | 2021-12-14 16:36:05 +0100 | [diff] [blame] | 28 | int rget_io_perms(void); |
| 29 | |
Thomas Heijligen | 4c39c43 | 2022-01-20 16:45:14 +0100 | [diff] [blame^] | 30 | void OUTB(uint8_t value, uint16_t port); |
| 31 | void OUTW(uint16_t value, uint16_t port); |
| 32 | void OUTL(uint32_t value, uint16_t port); |
| 33 | uint8_t INB(uint16_t port); |
| 34 | uint16_t INW(uint16_t port); |
| 35 | uint32_t INL(uint16_t port); |
Anastasia Klimchuk | 340b20f | 2021-04-27 16:13:32 +1000 | [diff] [blame] | 36 | |
| 37 | #endif /* __HWACCESS_X86_IO_H__ */ |