source: rtems/bsps/i386/include/bsp/realmode_int.h @ 7632906

5
Last change on this file since 7632906 was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/**
2 * @file realmode_int.h
3 *
4 * @ingroup i386_shared
5 *
6 * @brief Definitioins supporting real mode interrupt calls.
7 *
8 * Interface allows calling given interrupt number with content of the
9 * registers defined. For passing or receiving higher amounts of the data
10 * there is a buffer accessible from real mode available. Real mode pointer
11 * to this buffer is passed to the interrupt in the registers.
12 */
13
14/*
15 * Copyright (C) 2014  Jan DoleÅŸal (dolezj21@fel.cvut.cz)
16 *                     CTU in Prague.
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef _REALMODE_INT_H
24#define _REALMODE_INT_H
25
26#include <rtems/score/cpu.h>
27#include <stdint.h>
28
29#ifndef ASM /* ASM */
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* __cplusplus */
34
35/* --- BIOS service interrupt number --- */
36/* number of interrupt servicing video functions */
37#define INTERRUPT_NO_VIDEO_SERVICES 0x10
38
39/**
40 * @brief Used for passing and retrieving registers content to/from real mode
41 * interrupt call.
42 */
43typedef struct {
44    uint32_t reg_eax;
45    uint32_t reg_ebx;
46    uint32_t reg_ecx;
47    uint32_t reg_edx;
48    uint32_t reg_esi;
49    uint32_t reg_edi;
50    uint16_t reg_ds;
51    uint16_t reg_es;
52    uint16_t reg_fs;
53    uint16_t reg_gs;
54} RTEMS_PACKED i386_realmode_interrupt_registers;
55
56/**
57 * @brief Returns buffer and its size usable with real mode interrupt call.
58 *
59 * Provides position to real mode buffer. It is buffer
60 * accessible from real mode context - it is located below
61 * address ~0x100000 in order for it to be accessible
62 * This buffer is meant to be pointed to by segReg:GenPurpReg
63 * and through this get bigger portion of an information to/from
64 * interrupt service routine than just by using register.
65 *
66 * @param[out] size pointer to variable, where the size of buffer
67 *             will be filled
68 * @retval pointer to buffer
69 */
70extern void *i386_get_default_rm_buffer(uint16_t *size);
71
72/**
73 * @brief Call to real mode interrupt with specified int NO and processor
74 * registers.
75 *
76 * This function allows calling interrupts in real mode and to set processor
77 * registers as desired before interrupt call is made and to retrieve the
78 * registers content after call was made.
79 *
80 * @param[in] interrupt_number interrupt number to be called
81 * @param[in] ir pointer to structure containing registers to be passed to
82 *            interrupt and to retrieve register content after call was made.
83 * @retval  0 call failed (GDT too small or pagin is on)
84 * @retval  1 call successful
85 */
86extern int i386_real_interrupt_call(
87    uint8_t interrupt_number,
88    i386_realmode_interrupt_registers *ir
89);
90
91#ifdef __cplusplus
92}
93#endif /* __cplusplus */
94
95#endif /* ASM */
96
97#endif /* _REALMODE_INT_H */
Note: See TracBrowser for help on using the repository browser.