source: rtems/c/src/lib/libbsp/powerpc/mcp750/console/keyboard.h @ ba46ffa6

4.104.114.84.95
Last change on this file since ba46ffa6 was ba46ffa6, checked in by Joel Sherrill <joel.sherrill@…>, on 06/14/99 at 16:51:13

This is a large patch from Eric Valette <valette@…> that was
described in the message following this paragraph. This patch also includes
a mcp750 BSP.

From valette@… Mon Jun 14 10:03:08 1999
Date: Tue, 18 May 1999 01:30:14 +0200 (CEST)
From: VALETTE Eric <valette@…>
To: joel@…
Cc: raguet@…, rtems-snapshots@…, valette@…
Subject: Questions/Suggestion? regarding RTEMS PowerPC code (long)

Dear knowledgeable RTEMS powerpc users,

As some of you may know, I'm currently finalizing a port
of RTEMS on a MCP750 Motorola board. I have done most
of it but have some questions to ask before submitting
the port.

In order to understand some of the changes I have made
or would like to make, maybe it is worth describing the
MCP750 Motorola board.

the MCP750 is a COMPACT PCI powerpc board with :

1) a MPC750 233 MHz processor,
2) a raven bus bridge/PCI controller that
implement an OPENPIC compliant interrupt controller,
3) a VIA 82C586 PCI/ISA bridge that offers a PC
compliant IO for keyboard, serial line, IDE, and
the well known PC 8259 cascaded PIC interrupt
architecture model,
4) a DEC 21140 Ethernet controller,
5) the PPCBUG Motorola firmware in flash,
6) A DEC PCI bridge,

This architecture is common to most Motorola 60x/7xx
board except that :

1) on VME board, the DEC PCI bridge is replaced by
a VME chipset,
2) the VIA 82C586 PCI/ISA bridge is replaced by
another bridge that is almost fully compatible
with the via bridge...

So the port should be a rather close basis for many
60x/7xx motorola board...

On this board, I already have ported Linux 2.2.3 and
use it both as a development and target board.

Now the questions/suggestions I have :

1) EXCEPTION CODE


As far as I know exceptions on PPC are handled like
interrupts. I dislike this very much as :

a) Except for the decrementer exception (and
maybe some other on mpc8xx), exceptions are
not recoverable and the handler just need to print
the full context and go to the firmware or debugger...
b) The interrupt switch is only necessary for the
decrementer and external interrupt (at least on
6xx,7xx).
c) The full context for exception is never saved and
thus cannot be used by debugger... I do understand
the most important for interrupts low level code
is to save the minimal context enabling to call C
code for performance reasons. On non recoverable
exception on the other hand, the most important is
to save the maximum information concerning proc status
in order to analyze the reason of the fault. At
least we will need this in order to implement the
port of RGDB on PPC

==> I wrote an API for connecting raw exceptions (and thus
raw interrupts) for mpc750. It should be valid for most
powerpc processors... I hope to find a way to make this coexist
with actual code layout. The code is actually located
in lib/libcpu/powerpc/mpc750 and is thus optional
(provided I write my own version of exec/score/cpu/powerpc/cpu.c ...)

See remark about files/directory layout organization in 4)

2) Current Implementation of ISR low level code


I do not understand why the MSR EE flags is cleared
again in exec/score/cpu/powerpc/irq_stubs.S

#if (PPC_USE_SPRG)

mfmsr r5
mfspr r6, sprg2

#else

lwz r6,msr_initial(r11)
lis r5,~PPC_MSR_DISABLE_MASK@ha
ori r5,r5,~PPC_MSR_DISABLE_MASK@l
and r6,r6,r5
mfmsr r5

#endif

Reading the doc, when a decrementer interrupt or an
external interrupt is active, the MSR EE flag is already
cleared. BTW if exception/interrupt could occur, it would
trash SRR0 and SRR1. In fact the code may be useful to set
MSR[RI] that re-enables exception processing. BTW I will need
to set other value in MSR to handle interrupts :

a) I want the MSR[IR] and MSR[DR] to be set for
performance reasons and also because I need DBAT
support to have access to PCI memory space as the
interrupt controller is in the PCI space.

Reading the code, I see others have the same kind of request :

/* SCE 980217

*

  • We need address translation ON when we call our ISR routine

mtmsr r5

*/

This is just another prof that even the lowest level
IRQ code is fundamentally board dependent and
not simply processor dependent especially when
the processor use external interrupt controller
because it has a single interrupt request line...

Note that if you look at the PPC code high level interrupt
handling code, as the "set_vector" routine that really connects
the interrupt is in the BSP/startup/genpvec.c,
the fact that IRQ handling is BSP specific is DE-FACTO
acknowledged.

I know I have already expressed this and understand that this
would require some heavy change in the code but believe
me you will reach a point where you will not be able
to find a compatible while optimum implementation for low level
interrupt handling code...) In my case this is already true...

So please consider removing low level IRQ handling from
exec/score/cpu/* and only let there exception handling code...
Exceptions are usually only processor dependent and do
not depend on external hardware mechanism to be masked or
acknowledged or re-enabled (there are probably exception but ...)

I have already done this for pc386 bsp but need to make it again.
This time I will even propose an API.

3) R2/R13 manipulation for EABI implementation


I do not understand the handling of r2 and r13 in the
EABI case. The specification for r2 says pointer to sdata2,
sbss2 section => constant. However I do not see -ffixed-r2
passed to any compilation system in make/custom/*
(for info linux does this on PPC).

So either this is a default compiler option when choosing
powerpc-rtems and thus we do not need to do anything with
this register as all the code is compiled with this compiler
and linked together OR this register may be used by rtems code
and then we do not need any special initialization or
handling.

The specification for r13 says pointer to the small data
area. r13 argumentation is the same except that as far
as I know the usage of the small data area requires
specific compiler support so that access to variables is
compiled via loading the LSB in a register and then
using r13 to get full address... It is like a small
memory model and it was present in IBM C compilers.

=> I propose to suppress any specific code for r2 and
r13 in the EABI case.

4) Code layout organization (yes again :-))


I think there are a number of design flaws in the way
the code is for ppc organized and I will try to point them out.
I have been beaten by this again on this new port, and
was beaten last year while modifying code for pc386.

a) exec/score/cpu/* vs lib/libcpu/cpu/*.

I think that too many things are put in exec/score/cpu that
have nothing to do with RTEMS internals but are rather
related to CPU feature.

This include at least :

a) registers access routine (e.g GET_MSR_Value),
b) interrupt masking/unmasking routines,
c) cache_mngt_routine,
d) mmu_mngt_routine,
e) Routines to connect the raw_exception, raw_interrupt
handler,

b) lib/libcpu/cpu/powerpc/*

With a processor family as exuberant as the powerpc family,
and their well known subtle differences (604 vs 750) or
unfortunately majors (8xx vs 60x) the directory structure
is fine (except maybe the names that are not homogeneous)

powerpc

ppc421 mpc821 ...

I only needed to add mpc750. But the fact that libcpu.a was not
produced was a pain and the fact that this organization may
duplicates code is also problematic.

So, except if the support of automake provides a better solution
I would like to propose something like this :

powerpc

mpc421 mpc821 ... mpc750 shared wrapup

with the following rules :

a) "shared" would act as a source container for sources that may
be shared among processors. Needed files would be compiled inside
the processor specific directory using the vpath Makefile
mechanism. "shared" may also contain compilation code
for routine that are really shared and not worth to inline...
(did not found many things so far as registers access routine
ARE WORTH INLINING)... In the case something is compiled there,
it should create libcpushared.a

b) layout under processor specific directory is free provided
that

1)the result of the compilation process exports :

libcpu/powerpc/"PROC"/*.h in $(PROJECT_INCLUDE)/libcpu

2) each processor specific directory creates
a library called libcpuspecific.a

Note that this organization enables to have a file that
is nearly the same than in shared but that must differ
because of processor differences...

c) "wrapup" should create libcpu.a using libcpushared.a
libcpuspecific.a and export it $(PROJECT_INCLUDE)/libcpu

The only thing I have no ideal solution is the way to put shared
definitions in "shared" and only processor specific definition
in "proc". To give a concrete example, most MSR bit definition
are shared among PPC processors and only some differs. if we create
a single msr.h in shared it will have ifdef. If in msr.h we
include libcpu/msr_c.h we will need to have it in each prowerpc
specific directory (even empty). Opinions are welcomed ...

Note that a similar mechanism exist in libbsp/i386 that also
contains a shared directory that is used by several bsp
like pc386 and i386ex and a similar wrapup mechanism...

NB: I have done this for mpc750 and other processors could just use
similar Makefiles...

c) The exec/score/cpu/powerpc directory layout.

I think the directory layout should be the same than the
libcpu/powerpc. As it is not, there are a lot of ifdefs
inside the code... And of course low level interrupt handling
code should be removed...

Besides that I do not understand why

1) things are compiled in the wrap directory,
2) some includes are moved to rtems/score,

I think the "preinstall" mechanism enables to put
everything in the current directory (or better in a per processor
directory),

5) Interrupt handling API


Again :-). But I think that using all the features the PIC
offers is a MUST for RT system. I already explained in the
prologue of this (long and probably boring) mail that the MCP750
boards offers an OPENPIC compliant architecture and that
the VIA 82586 PCI/ISA bridge offers a PC compatible IO and
PIC mapping. Here is a logical view of the RAVEN/VIA 82586
interrupt mapping :


| OPEN | <-----|8259|
| PIC | | | 2 ------
|(RAVEN)| | | <-----|8259|
| | | | | | 11
| | | | | | <----
| | | | | |
| | | | | |


------
| VIA PCI/ISA bridge
| x
-------- PCI interrupts

OPENPIC offers interrupt priorities among PCI interrupts
and interrupt selective masking. The 8259 offers the same kind
of feature. With actual powerpc interrupt code :

1) there is no way to specify priorities among
interrupts handler. This is REALLY a bad thing.
For me it is as importnat as having priorities
for threads...
2) for my implementation, each ISR should
contain the code that acknowledge the RAVEN
and 8259 cascade, modify interrupt mask on both
chips, and reenable interrupt at processor level,
..., restore then on interrupt return,.... This code
is actually similar to code located in some
genpvec.c powerpc files,
3) I must update _ISR_Nesting_level because
irq.inl use it...
4) the libchip code connects the ISR via set_vector
but the libchip handler code does not contain any code to
manipulate external interrupt controller hardware
in order to acknoledge the interrupt or re-enable
them (except for the target hardware of course)
So this code is broken unless set_vector adds an
additionnal prologue/epilogue before calling/returning
from in order to acknoledge/mask the raven and the
8259 PICS... => Anyway already EACH BSP MUST REWRITE
PART OF INTERRUPT HANDLING CODE TO CORRECTLY IMPLEMENT
SET_VECTOR.

I would rather offer an API similar to the one provided
in libbsp/i386/shared/irq/irq.h so that :

1) Once the driver supplied methods is called the
only things the ISR has to do is to worry about the
external hardware that triggered the interrupt.
Everything on openpic/VIA/processor would have been
done by the low levels (same things as set-vector)
2) The caller will need to supply the on/off/isOn
routine that are fundamental to correctly implements
debuggers/performance monitoring is a portable way
3) A globally configurable interrupt priorities
mechanism...

I have nothing against providing a compatible
set_vector just to make libchip happy but
as I have already explained in other
mails (months ago), I really think that the ISR
connection should be handled by the BSP and that no
code containing irq connection should exist the
rtems generic layers... Thus I really dislike
libchip on this aspect because in a long term
it will force to adopt the less reach API
for interrupt handling that exists (set_vector).

Additional note : I think the _ISR_Is_in_progress()
inline routine should be :

1) Put in a processor specific section,
2) Should not rely on a global variable,

As :

a) on symmetric MP, there is one interrupt level
per CPU,
b) On processor that have an ISP (e,g 68040),
this variable is useless (MSR bit testing could
be used)
c) On PPC, instead of using the address of the
variable via CPU_IRQ_info.Nest_level a dedicated
SPR could be used.

NOTE: most of this is also true for _Thread_Dispatch_disable_level

END NOTE


Please do not take what I said in the mail as a criticism for
anyone who submitted ppc code. Any code present helped me
a lot understanding PPC behavior. I just wanted by this
mail to :

1) try to better understand the actual code,
2) propose concrete ways of enhancing current code
by providing an alternative implementation for MCP750. I
will make my best effort to try to brake nothing but this
is actually hard due to the file layout organisation.
3) make understandable some changes I will probably make
if joel let me do them :-)

Any comments/objections are welcomed as usual.

--


/ ` Eric Valette

/-- o _. Canon CRF

(_, / (_(_( Rue de la touche lambert

35517 Cesson-Sevigne Cedex
FRANCE

Tel: +33 (0)2 99 87 68 91 Fax: +33 (0)2 99 84 11 30
E-mail: valette@…

  • Property mode set to 100644
File size: 11.8 KB
Line 
1#ifndef __LINUX_KEYBOARD_H
2#define __LINUX_KEYBOARD_H
3
4#define KG_SHIFT        0
5#define KG_CTRL         2
6#define KG_ALT          3
7#define KG_ALTGR        1
8#define KG_SHIFTL       4
9#define KG_SHIFTR       5
10#define KG_CTRLL        6
11#define KG_CTRLR        7
12#define KG_CAPSSHIFT    8
13
14#define NR_SHIFT        9
15
16#define NR_KEYS         128
17#define MAX_NR_KEYMAPS  256
18/* This means 64Kb if all keymaps are allocated. Only the superuser
19        may increase the number of keymaps beyond MAX_NR_OF_USER_KEYMAPS. */
20#define MAX_NR_OF_USER_KEYMAPS 256      /* should be at least 7 */
21
22#define MAX_NR_FUNC     256     /* max nr of strings assigned to keys */
23
24#define KT_LATIN        0       /* we depend on this being zero */
25#define KT_LETTER       11      /* symbol that can be acted upon by CapsLock */
26#define KT_FN           1
27#define KT_SPEC         2
28#define KT_PAD          3
29#define KT_DEAD         4
30#define KT_CONS         5
31#define KT_CUR          6
32#define KT_SHIFT        7
33#define KT_META         8
34#define KT_ASCII        9
35#define KT_LOCK         10
36#define KT_SLOCK        12
37
38#define K(t,v)          (((t)<<8)|(v))
39#define KTYP(x)         ((x) >> 8)
40#define KVAL(x)         ((x) & 0xff)
41
42#define K_F1            K(KT_FN,0)
43#define K_F2            K(KT_FN,1)
44#define K_F3            K(KT_FN,2)
45#define K_F4            K(KT_FN,3)
46#define K_F5            K(KT_FN,4)
47#define K_F6            K(KT_FN,5)
48#define K_F7            K(KT_FN,6)
49#define K_F8            K(KT_FN,7)
50#define K_F9            K(KT_FN,8)
51#define K_F10           K(KT_FN,9)
52#define K_F11           K(KT_FN,10)
53#define K_F12           K(KT_FN,11)
54#define K_F13           K(KT_FN,12)
55#define K_F14           K(KT_FN,13)
56#define K_F15           K(KT_FN,14)
57#define K_F16           K(KT_FN,15)
58#define K_F17           K(KT_FN,16)
59#define K_F18           K(KT_FN,17)
60#define K_F19           K(KT_FN,18)
61#define K_F20           K(KT_FN,19)
62#define K_FIND          K(KT_FN,20)
63#define K_INSERT        K(KT_FN,21)
64#define K_REMOVE        K(KT_FN,22)
65#define K_SELECT        K(KT_FN,23)
66#define K_PGUP          K(KT_FN,24) /* PGUP is a synonym for PRIOR */
67#define K_PGDN          K(KT_FN,25) /* PGDN is a synonym for NEXT */
68#define K_MACRO         K(KT_FN,26)
69#define K_HELP          K(KT_FN,27)
70#define K_DO            K(KT_FN,28)
71#define K_PAUSE         K(KT_FN,29)
72#define K_F21           K(KT_FN,30)
73#define K_F22           K(KT_FN,31)
74#define K_F23           K(KT_FN,32)
75#define K_F24           K(KT_FN,33)
76#define K_F25           K(KT_FN,34)
77#define K_F26           K(KT_FN,35)
78#define K_F27           K(KT_FN,36)
79#define K_F28           K(KT_FN,37)
80#define K_F29           K(KT_FN,38)
81#define K_F30           K(KT_FN,39)
82#define K_F31           K(KT_FN,40)
83#define K_F32           K(KT_FN,41)
84#define K_F33           K(KT_FN,42)
85#define K_F34           K(KT_FN,43)
86#define K_F35           K(KT_FN,44)
87#define K_F36           K(KT_FN,45)
88#define K_F37           K(KT_FN,46)
89#define K_F38           K(KT_FN,47)
90#define K_F39           K(KT_FN,48)
91#define K_F40           K(KT_FN,49)
92#define K_F41           K(KT_FN,50)
93#define K_F42           K(KT_FN,51)
94#define K_F43           K(KT_FN,52)
95#define K_F44           K(KT_FN,53)
96#define K_F45           K(KT_FN,54)
97#define K_F46           K(KT_FN,55)
98#define K_F47           K(KT_FN,56)
99#define K_F48           K(KT_FN,57)
100#define K_F49           K(KT_FN,58)
101#define K_F50           K(KT_FN,59)
102#define K_F51           K(KT_FN,60)
103#define K_F52           K(KT_FN,61)
104#define K_F53           K(KT_FN,62)
105#define K_F54           K(KT_FN,63)
106#define K_F55           K(KT_FN,64)
107#define K_F56           K(KT_FN,65)
108#define K_F57           K(KT_FN,66)
109#define K_F58           K(KT_FN,67)
110#define K_F59           K(KT_FN,68)
111#define K_F60           K(KT_FN,69)
112#define K_F61           K(KT_FN,70)
113#define K_F62           K(KT_FN,71)
114#define K_F63           K(KT_FN,72)
115#define K_F64           K(KT_FN,73)
116#define K_F65           K(KT_FN,74)
117#define K_F66           K(KT_FN,75)
118#define K_F67           K(KT_FN,76)
119#define K_F68           K(KT_FN,77)
120#define K_F69           K(KT_FN,78)
121#define K_F70           K(KT_FN,79)
122#define K_F71           K(KT_FN,80)
123#define K_F72           K(KT_FN,81)
124#define K_F73           K(KT_FN,82)
125#define K_F74           K(KT_FN,83)
126#define K_F75           K(KT_FN,84)
127#define K_F76           K(KT_FN,85)
128#define K_F77           K(KT_FN,86)
129#define K_F78           K(KT_FN,87)
130#define K_F79           K(KT_FN,88)
131#define K_F80           K(KT_FN,89)
132#define K_F81           K(KT_FN,90)
133#define K_F82           K(KT_FN,91)
134#define K_F83           K(KT_FN,92)
135#define K_F84           K(KT_FN,93)
136#define K_F85           K(KT_FN,94)
137#define K_F86           K(KT_FN,95)
138#define K_F87           K(KT_FN,96)
139#define K_F88           K(KT_FN,97)
140#define K_F89           K(KT_FN,98)
141#define K_F90           K(KT_FN,99)
142#define K_F91           K(KT_FN,100)
143#define K_F92           K(KT_FN,101)
144#define K_F93           K(KT_FN,102)
145#define K_F94           K(KT_FN,103)
146#define K_F95           K(KT_FN,104)
147#define K_F96           K(KT_FN,105)
148#define K_F97           K(KT_FN,106)
149#define K_F98           K(KT_FN,107)
150#define K_F99           K(KT_FN,108)
151#define K_F100          K(KT_FN,109)
152#define K_F101          K(KT_FN,110)
153#define K_F102          K(KT_FN,111)
154#define K_F103          K(KT_FN,112)
155#define K_F104          K(KT_FN,113)
156#define K_F105          K(KT_FN,114)
157#define K_F106          K(KT_FN,115)
158#define K_F107          K(KT_FN,116)
159#define K_F108          K(KT_FN,117)
160#define K_F109          K(KT_FN,118)
161#define K_F110          K(KT_FN,119)
162#define K_F111          K(KT_FN,120)
163#define K_F112          K(KT_FN,121)
164#define K_F113          K(KT_FN,122)
165#define K_F114          K(KT_FN,123)
166#define K_F115          K(KT_FN,124)
167#define K_F116          K(KT_FN,125)
168#define K_F117          K(KT_FN,126)
169#define K_F118          K(KT_FN,127)
170#define K_F119          K(KT_FN,128)
171#define K_F120          K(KT_FN,129)
172#define K_F121          K(KT_FN,130)
173#define K_F122          K(KT_FN,131)
174#define K_F123          K(KT_FN,132)
175#define K_F124          K(KT_FN,133)
176#define K_F125          K(KT_FN,134)
177#define K_F126          K(KT_FN,135)
178#define K_F127          K(KT_FN,136)
179#define K_F128          K(KT_FN,137)
180#define K_F129          K(KT_FN,138)
181#define K_F130          K(KT_FN,139)
182#define K_F131          K(KT_FN,140)
183#define K_F132          K(KT_FN,141)
184#define K_F133          K(KT_FN,142)
185#define K_F134          K(KT_FN,143)
186#define K_F135          K(KT_FN,144)
187#define K_F136          K(KT_FN,145)
188#define K_F137          K(KT_FN,146)
189#define K_F138          K(KT_FN,147)
190#define K_F139          K(KT_FN,148)
191#define K_F140          K(KT_FN,149)
192#define K_F141          K(KT_FN,150)
193#define K_F142          K(KT_FN,151)
194#define K_F143          K(KT_FN,152)
195#define K_F144          K(KT_FN,153)
196#define K_F145          K(KT_FN,154)
197#define K_F146          K(KT_FN,155)
198#define K_F147          K(KT_FN,156)
199#define K_F148          K(KT_FN,157)
200#define K_F149          K(KT_FN,158)
201#define K_F150          K(KT_FN,159)
202#define K_F151          K(KT_FN,160)
203#define K_F152          K(KT_FN,161)
204#define K_F153          K(KT_FN,162)
205#define K_F154          K(KT_FN,163)
206#define K_F155          K(KT_FN,164)
207#define K_F156          K(KT_FN,165)
208#define K_F157          K(KT_FN,166)
209#define K_F158          K(KT_FN,167)
210#define K_F159          K(KT_FN,168)
211#define K_F160          K(KT_FN,169)
212#define K_F161          K(KT_FN,170)
213#define K_F162          K(KT_FN,171)
214#define K_F163          K(KT_FN,172)
215#define K_F164          K(KT_FN,173)
216#define K_F165          K(KT_FN,174)
217#define K_F166          K(KT_FN,175)
218#define K_F167          K(KT_FN,176)
219#define K_F168          K(KT_FN,177)
220#define K_F169          K(KT_FN,178)
221#define K_F170          K(KT_FN,179)
222#define K_F171          K(KT_FN,180)
223#define K_F172          K(KT_FN,181)
224#define K_F173          K(KT_FN,182)
225#define K_F174          K(KT_FN,183)
226#define K_F175          K(KT_FN,184)
227#define K_F176          K(KT_FN,185)
228#define K_F177          K(KT_FN,186)
229#define K_F178          K(KT_FN,187)
230#define K_F179          K(KT_FN,188)
231#define K_F180          K(KT_FN,189)
232#define K_F181          K(KT_FN,190)
233#define K_F182          K(KT_FN,191)
234#define K_F183          K(KT_FN,192)
235#define K_F184          K(KT_FN,193)
236#define K_F185          K(KT_FN,194)
237#define K_F186          K(KT_FN,195)
238#define K_F187          K(KT_FN,196)
239#define K_F188          K(KT_FN,197)
240#define K_F189          K(KT_FN,198)
241#define K_F190          K(KT_FN,199)
242#define K_F191          K(KT_FN,200)
243#define K_F192          K(KT_FN,201)
244#define K_F193          K(KT_FN,202)
245#define K_F194          K(KT_FN,203)
246#define K_F195          K(KT_FN,204)
247#define K_F196          K(KT_FN,205)
248#define K_F197          K(KT_FN,206)
249#define K_F198          K(KT_FN,207)
250#define K_F199          K(KT_FN,208)
251#define K_F200          K(KT_FN,209)
252#define K_F201          K(KT_FN,210)
253#define K_F202          K(KT_FN,211)
254#define K_F203          K(KT_FN,212)
255#define K_F204          K(KT_FN,213)
256#define K_F205          K(KT_FN,214)
257#define K_F206          K(KT_FN,215)
258#define K_F207          K(KT_FN,216)
259#define K_F208          K(KT_FN,217)
260#define K_F209          K(KT_FN,218)
261#define K_F210          K(KT_FN,219)
262#define K_F211          K(KT_FN,220)
263#define K_F212          K(KT_FN,221)
264#define K_F213          K(KT_FN,222)
265#define K_F214          K(KT_FN,223)
266#define K_F215          K(KT_FN,224)
267#define K_F216          K(KT_FN,225)
268#define K_F217          K(KT_FN,226)
269#define K_F218          K(KT_FN,227)
270#define K_F219          K(KT_FN,228)
271#define K_F220          K(KT_FN,229)
272#define K_F221          K(KT_FN,230)
273#define K_F222          K(KT_FN,231)
274#define K_F223          K(KT_FN,232)
275#define K_F224          K(KT_FN,233)
276#define K_F225          K(KT_FN,234)
277#define K_F226          K(KT_FN,235)
278#define K_F227          K(KT_FN,236)
279#define K_F228          K(KT_FN,237)
280#define K_F229          K(KT_FN,238)
281#define K_F230          K(KT_FN,239)
282#define K_F231          K(KT_FN,240)
283#define K_F232          K(KT_FN,241)
284#define K_F233          K(KT_FN,242)
285#define K_F234          K(KT_FN,243)
286#define K_F235          K(KT_FN,244)
287#define K_F236          K(KT_FN,245)
288#define K_F237          K(KT_FN,246)
289#define K_F238          K(KT_FN,247)
290#define K_F239          K(KT_FN,248)
291#define K_F240          K(KT_FN,249)
292#define K_F241          K(KT_FN,250)
293#define K_F242          K(KT_FN,251)
294#define K_F243          K(KT_FN,252)
295#define K_F244          K(KT_FN,253)
296#define K_F245          K(KT_FN,254)
297#define K_UNDO          K(KT_FN,255)
298
299
300#define K_HOLE          K(KT_SPEC,0)
301#define K_ENTER         K(KT_SPEC,1)
302#define K_SH_REGS       K(KT_SPEC,2)
303#define K_SH_MEM        K(KT_SPEC,3)
304#define K_SH_STAT       K(KT_SPEC,4)
305#define K_BREAK         K(KT_SPEC,5)
306#define K_CONS          K(KT_SPEC,6)
307#define K_CAPS          K(KT_SPEC,7)
308#define K_NUM           K(KT_SPEC,8)
309#define K_HOLD          K(KT_SPEC,9)
310#define K_SCROLLFORW    K(KT_SPEC,10)
311#define K_SCROLLBACK    K(KT_SPEC,11)
312#define K_BOOT          K(KT_SPEC,12)
313#define K_CAPSON        K(KT_SPEC,13)
314#define K_COMPOSE       K(KT_SPEC,14)
315#define K_SAK           K(KT_SPEC,15)
316#define K_DECRCONSOLE   K(KT_SPEC,16)
317#define K_INCRCONSOLE   K(KT_SPEC,17)
318#define K_SPAWNCONSOLE  K(KT_SPEC,18)
319#define K_BARENUMLOCK   K(KT_SPEC,19)
320
321#define K_ALLOCATED     K(KT_SPEC,126) /* dynamically allocated keymap */
322#define K_NOSUCHMAP     K(KT_SPEC,127) /* returned by KDGKBENT */
323
324#define K_P0            K(KT_PAD,0)
325#define K_P1            K(KT_PAD,1)
326#define K_P2            K(KT_PAD,2)
327#define K_P3            K(KT_PAD,3)
328#define K_P4            K(KT_PAD,4)
329#define K_P5            K(KT_PAD,5)
330#define K_P6            K(KT_PAD,6)
331#define K_P7            K(KT_PAD,7)
332#define K_P8            K(KT_PAD,8)
333#define K_P9            K(KT_PAD,9)
334#define K_PPLUS         K(KT_PAD,10)    /* key-pad plus */
335#define K_PMINUS        K(KT_PAD,11)    /* key-pad minus */
336#define K_PSTAR         K(KT_PAD,12)    /* key-pad asterisk (star) */
337#define K_PSLASH        K(KT_PAD,13)    /* key-pad slash */
338#define K_PENTER        K(KT_PAD,14)    /* key-pad enter */
339#define K_PCOMMA        K(KT_PAD,15)    /* key-pad comma: kludge... */
340#define K_PDOT          K(KT_PAD,16)    /* key-pad dot (period): kludge... */
341#define K_PPLUSMINUS    K(KT_PAD,17)    /* key-pad plus/minus */
342#define K_PPARENL       K(KT_PAD,18)    /* key-pad left parenthesis */
343#define K_PPARENR       K(KT_PAD,19)    /* key-pad right parenthesis */
344
345#define NR_PAD          20
346
347#define K_DGRAVE        K(KT_DEAD,0)
348#define K_DACUTE        K(KT_DEAD,1)
349#define K_DCIRCM        K(KT_DEAD,2)
350#define K_DTILDE        K(KT_DEAD,3)
351#define K_DDIERE        K(KT_DEAD,4)
352#define K_DCEDIL        K(KT_DEAD,5)
353
354#define NR_DEAD         6
355
356#define K_DOWN          K(KT_CUR,0)
357#define K_LEFT          K(KT_CUR,1)
358#define K_RIGHT         K(KT_CUR,2)
359#define K_UP            K(KT_CUR,3)
360
361#define K_SHIFT         K(KT_SHIFT,KG_SHIFT)
362#define K_CTRL          K(KT_SHIFT,KG_CTRL)
363#define K_ALT           K(KT_SHIFT,KG_ALT)
364#define K_ALTGR         K(KT_SHIFT,KG_ALTGR)
365#define K_SHIFTL        K(KT_SHIFT,KG_SHIFTL)
366#define K_SHIFTR        K(KT_SHIFT,KG_SHIFTR)
367#define K_CTRLL         K(KT_SHIFT,KG_CTRLL)
368#define K_CTRLR         K(KT_SHIFT,KG_CTRLR)
369#define K_CAPSSHIFT     K(KT_SHIFT,KG_CAPSSHIFT)
370
371#define K_ASC0          K(KT_ASCII,0)
372#define K_ASC1          K(KT_ASCII,1)
373#define K_ASC2          K(KT_ASCII,2)
374#define K_ASC3          K(KT_ASCII,3)
375#define K_ASC4          K(KT_ASCII,4)
376#define K_ASC5          K(KT_ASCII,5)
377#define K_ASC6          K(KT_ASCII,6)
378#define K_ASC7          K(KT_ASCII,7)
379#define K_ASC8          K(KT_ASCII,8)
380#define K_ASC9          K(KT_ASCII,9)
381#define K_HEX0          K(KT_ASCII,10)
382#define K_HEX1          K(KT_ASCII,11)
383#define K_HEX2          K(KT_ASCII,12)
384#define K_HEX3          K(KT_ASCII,13)
385#define K_HEX4          K(KT_ASCII,14)
386#define K_HEX5          K(KT_ASCII,15)
387#define K_HEX6          K(KT_ASCII,16)
388#define K_HEX7          K(KT_ASCII,17)
389#define K_HEX8          K(KT_ASCII,18)
390#define K_HEX9          K(KT_ASCII,19)
391#define K_HEXa          K(KT_ASCII,20)
392#define K_HEXb          K(KT_ASCII,21)
393#define K_HEXc          K(KT_ASCII,22)
394#define K_HEXd          K(KT_ASCII,23)
395#define K_HEXe          K(KT_ASCII,24)
396#define K_HEXf          K(KT_ASCII,25)
397
398#define NR_ASCII        26
399
400#define K_SHIFTLOCK     K(KT_LOCK,KG_SHIFT)
401#define K_CTRLLOCK      K(KT_LOCK,KG_CTRL)
402#define K_ALTLOCK       K(KT_LOCK,KG_ALT)
403#define K_ALTGRLOCK     K(KT_LOCK,KG_ALTGR)
404#define K_SHIFTLLOCK    K(KT_LOCK,KG_SHIFTL)
405#define K_SHIFTRLOCK    K(KT_LOCK,KG_SHIFTR)
406#define K_CTRLLLOCK     K(KT_LOCK,KG_CTRLL)
407#define K_CTRLRLOCK     K(KT_LOCK,KG_CTRLR)
408
409#define K_SHIFT_SLOCK   K(KT_SLOCK,KG_SHIFT)
410#define K_CTRL_SLOCK    K(KT_SLOCK,KG_CTRL)
411#define K_ALT_SLOCK     K(KT_SLOCK,KG_ALT)
412#define K_ALTGR_SLOCK   K(KT_SLOCK,KG_ALTGR)
413#define K_SHIFTL_SLOCK  K(KT_SLOCK,KG_SHIFTL)
414#define K_SHIFTR_SLOCK  K(KT_SLOCK,KG_SHIFTR)
415#define K_CTRLL_SLOCK   K(KT_SLOCK,KG_CTRLL)
416#define K_CTRLR_SLOCK   K(KT_SLOCK,KG_CTRLR)
417
418#define NR_LOCK         8
419
420#define MAX_DIACR       256
421#endif
Note: See TracBrowser for help on using the repository browser.