5
Last change
on this file since cf811a4 was
cf811a4,
checked in by Amaan Cheval <amaan.cheval@…>, on 07/09/18 at 11:12:57
|
x86_64/console: Add NS16550 polled console driver
This addition allows us to successfully run the sample hello.exe test.
Updates #2898.
|
-
Property mode set to
100644
|
File size:
926 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief CPU Port Implementation API |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2018. |
---|
9 | * Amaan Cheval <amaan.cheval@gmail.com> |
---|
10 | * |
---|
11 | * Copyright (c) 2013, 2016 embedded brains GmbH |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef _RTEMS_SCORE_CPUIMPL_H |
---|
19 | #define _RTEMS_SCORE_CPUIMPL_H |
---|
20 | |
---|
21 | #include <rtems/score/cpu.h> |
---|
22 | |
---|
23 | #define CPU_PER_CPU_CONTROL_SIZE 0 |
---|
24 | |
---|
25 | #ifndef ASM |
---|
26 | |
---|
27 | #ifdef __cplusplus |
---|
28 | extern "C" { |
---|
29 | #endif |
---|
30 | |
---|
31 | static inline uint8_t inport_byte(uint16_t port) |
---|
32 | { |
---|
33 | uint8_t ret; |
---|
34 | __asm__ volatile ( "inb %1, %0" |
---|
35 | : "=a" (ret) |
---|
36 | : "Nd" (port) ); |
---|
37 | return ret; |
---|
38 | } |
---|
39 | |
---|
40 | static inline void outport_byte(uint16_t port, uint8_t val) |
---|
41 | { |
---|
42 | __asm__ volatile ( "outb %0, %1" : : "a" (val), "Nd" (port) ); |
---|
43 | } |
---|
44 | |
---|
45 | #ifdef __cplusplus |
---|
46 | } |
---|
47 | #endif |
---|
48 | |
---|
49 | #endif /* ASM */ |
---|
50 | |
---|
51 | #endif /* _RTEMS_SCORE_CPUIMPL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.