RTEMS 7.0-rc1
Loading...
Searching...
No Matches
irq_asm.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/*
13 *
14 * Copyright (c) 1998 Eric Valette <eric.valette@free.fr>
15 *
16 * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE.
38 */
39
40#ifndef __I8259S_H__
41#define __I8259S_H__
42
43#define BSP_ASM_IRQ_VECTOR_BASE 0x20
45#define PIC_MASTER_COMMAND_IO_PORT 0x20
46#define PIC_SLAVE_COMMAND_IO_PORT 0xa0
47#define PIC_MASTER_IMR_IO_PORT 0x21
48#define PIC_SLAVE_IMR_IO_PORT 0xa1
49
51#define PIC_EOSI 0x60
52#define PIC_EOI 0x20
53
54/* Operation control word type 3. Bit 3 (0x08) must be set. Even address. */
55#define PIC_OCW3_RIS 0x01 /* 1 = read IS, 0 = read IR */
56#define PIC_OCW3_RR 0x02 /* register read */
57#define PIC_OCW3_P 0x04 /* poll mode command */
58/* 0x08 must be 1 to select OCW3 vs OCW2 */
59#define PIC_OCW3_SEL 0x08 /* must be 1 */
60/* 0x10 must be 0 to select OCW3 vs ICW1 */
61#define PIC_OCW3_SMM 0x20 /* special mode mask */
62#define PIC_OCW3_ESMM 0x40 /* enable SMM */
63
64#endif