Changeset ec494ff in rtems


Ignore:
Timestamp:
Nov 20, 2014, 2:00:26 PM (5 years ago)
Author:
Jan Dolezal <dolezj21@…>
Branches:
4.11, master
Children:
58af50d
Parents:
a634feb
git-author:
Jan Dolezal <dolezj21@…> (11/20/14 14:00:26)
git-committer:
Gedare Bloom <gedare@…> (11/20/14 14:52:38)
Message:

i386/pc386: configurable size of descriptor tables

Location:
c/src/lib/libbsp/i386/pc386
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/Makefile.am

    ra634feb rec494ff  
    3333include_bsp_HEADERS += console/rtd316.h
    3434include_bsp_HEADERS += console/exar17d15x.h
     35include_bsp_HEADERS += include/tblsizes.h
    3536
    3637if HAS_SMP
  • c/src/lib/libbsp/i386/pc386/configure.ac

    ra634feb rec494ff  
    8383AM_CONDITIONAL(USE_CIRRUS_GD5446,test "$USE_CIRRUS_GD5446" = "1")
    8484
     85RTEMS_BSPOPTS_SET([NUM_APP_DRV_GDT_DESCRIPTORS],[*],[0])
     86RTEMS_BSPOPTS_HELP([NUM_APP_DRV_GDT_DESCRIPTORS],
     87[Defines how many descriptors in GDT may be allocated for application or
     88 driver usage.])
     89
    8590if test X${CLOCK_DRIVER_USE_TSC} = X1 -a X${CLOCK_DRIVER_USE_8254} = X1 ; then
    8691  AC_MSG_ERROR([pc386 both TSC and 8254 specified for clock driver])
  • c/src/lib/libbsp/i386/pc386/include/bsp.h

    ra634feb rec494ff  
    5252#include <bspopts.h>
    5353#include <bsp/default-initial-extension.h>
     54#include <bsp/tblsizes.h>
    5455
    5556#include <rtems.h>
     
    167168| External Variables.
    168169+--------------------------------------------------------------------------*/
    169 #define IDT_SIZE 256
    170 #define GDT_SIZE 3
    171 
    172170extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE];
    173 extern segment_descriptors Global_descriptor_table   [GDT_SIZE];
     171extern segment_descriptors _Global_descriptor_table   [GDT_SIZE];
    174172
    175173/*-------------------------------------------------------------------------+
  • c/src/lib/libbsp/i386/pc386/preinstall.am

    ra634feb rec494ff  
    8282PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/exar17d15x.h
    8383
     84$(PROJECT_INCLUDE)/bsp/tblsizes.h: include/tblsizes.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     85        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/tblsizes.h
     86PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/tblsizes.h
     87
    8488if HAS_SMP
    8589$(PROJECT_INCLUDE)/bsp/apic.h: ../../i386/shared/irq/apic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
  • c/src/lib/libbsp/i386/pc386/startup/ldsegs.S

    ra634feb rec494ff  
    3535
    3636#include <rtems/asm.h>
     37#include <bsp/tblsizes.h> /* contains sizes of GDT and IDT */
    3738
    3839/*----------------------------------------------------------------------------+
     
    168169| GDT itself
    169170+--------------------------------------------------------------------------*/
     171#if GDT_SIZE < 3
     172#error "GDT_SIZE must be at least 3"
     173#endif
    170174
    171175BEGIN_DATA
     
    187191        .byte 0, 0x92, 0xcf, 0
    188192
     193        /* allocated space for user segments */
     194        .rept (GDT_SIZE - 3)
     195        .word 0,0,0,0
     196        .endr
     197
    189198/*---------------------------------------------------------------------------+
    190199| Descriptor of GDT
    191200+--------------------------------------------------------------------------*/
    192 SYM (gdtdesc):
    193         .word (3*8 - 1)
     201        PUBLIC(gdtdesc)
     202SYM(gdtdesc):
     203        .word (GDT_SIZE*8 - 1)
    194204        .long SYM (_Global_descriptor_table)
    195205
     
    201211        PUBLIC(Interrupt_descriptor_table)
    202212SYM(Interrupt_descriptor_table):
    203         .rept 256
     213        .rept IDT_SIZE
    204214        .word 0,0,0,0
    205215        .endr
     
    212222        PUBLIC(IDT_Descriptor)
    213223SYM(IDT_Descriptor):
    214         .word  (256*8 - 1)
     224        .word  (IDT_SIZE*8 - 1)
    215225        .long  SYM (Interrupt_descriptor_table)
    216226
Note: See TracChangeset for help on using the changeset viewer.