xref: /aosp_15_r20/external/flashrom/include/hwaccess_x86_io.h (revision 0d6140be3aa665ecc836e8907834fcd3e3b018fc)
1 /*
2  * This file is part of the flashrom project.
3  *
4  * Copyright (C) 2009 Carl-Daniel Hailfinger
5  * Copyright (C) 2022 secunet Security Networks AG
6  * (Written by Thomas Heijligen <[email protected])
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 
18 /*
19  * This file contains prototypes for x86 I/O Port access.
20  */
21 
22 #ifndef __HWACCESS_X86_IO_H__
23 #define __HWACCESS_X86_IO_H__ 1
24 
25 #include <stdint.h>
26 /**
27  */
28 int rget_io_perms(void);
29 
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);
36 
37 #endif /* __HWACCESS_X86_IO_H__ */
38