forked from Imagelibrary/rtems
pc386: Add BSP_ENABLE_VGA BSP option
This allows the VGA and keyboard console to be completely disabled. It is useful on PCs without displays and prevents a very slow boot time on the Intel Edison.
This commit is contained in:
@@ -74,14 +74,14 @@ libbsp_a_SOURCES += ../../shared/tod.c
|
|||||||
libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
|
libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
|
||||||
|
|
||||||
include_rtemsdir = $(includedir)/rtems
|
include_rtemsdir = $(includedir)/rtems
|
||||||
include_rtems_HEADERS = console/keyboard.h
|
include_rtems_HEADERS =
|
||||||
|
|
||||||
|
if RTEMS_VGA
|
||||||
|
include_rtems_HEADERS += console/keyboard.h
|
||||||
include_rtems_HEADERS += console/kd.h
|
include_rtems_HEADERS += console/kd.h
|
||||||
include_rtems_HEADERS += console/ps2_drv.h
|
include_rtems_HEADERS += console/ps2_drv.h
|
||||||
include_rtems_HEADERS += ../../shared/console_private.h
|
include_rtems_HEADERS += ../../shared/console_private.h
|
||||||
include_rtems_HEADERS += console/vgacons.h
|
include_rtems_HEADERS += console/vgacons.h
|
||||||
|
|
||||||
include_HEADERS += ../../i386/shared/comm/i386_io.h
|
|
||||||
# console
|
|
||||||
libbsp_a_SOURCES += console/inch.c
|
libbsp_a_SOURCES += console/inch.c
|
||||||
libbsp_a_SOURCES += console/outch.c
|
libbsp_a_SOURCES += console/outch.c
|
||||||
libbsp_a_SOURCES += console/defkeymap.c
|
libbsp_a_SOURCES += console/defkeymap.c
|
||||||
@@ -92,20 +92,7 @@ libbsp_a_SOURCES += console/vgainit.c
|
|||||||
libbsp_a_SOURCES += console/vt.c
|
libbsp_a_SOURCES += console/vt.c
|
||||||
libbsp_a_SOURCES += console/videoAsm.S
|
libbsp_a_SOURCES += console/videoAsm.S
|
||||||
libbsp_a_SOURCES += console/kbd_parser.c
|
libbsp_a_SOURCES += console/kbd_parser.c
|
||||||
libbsp_a_SOURCES += console/serial_mouse_config.c
|
|
||||||
libbsp_a_SOURCES += ../../i386/shared/comm/uart.c
|
|
||||||
libbsp_a_SOURCES += ../../i386/shared/comm/tty_drv.c
|
|
||||||
libbsp_a_SOURCES += ../../i386/shared/realmode_int/realmode_int.c
|
|
||||||
libbsp_a_SOURCES += ../../shared/console.c
|
|
||||||
libbsp_a_SOURCES += console/console_select.c
|
|
||||||
libbsp_a_SOURCES += ../../shared/console_read.c
|
|
||||||
libbsp_a_SOURCES += ../../shared/console_write.c
|
|
||||||
libbsp_a_SOURCES += console/console_control.c
|
|
||||||
libbsp_a_SOURCES += console/conscfg.c
|
|
||||||
libbsp_a_SOURCES += console/printk_support.c
|
|
||||||
libbsp_a_SOURCES += console/vgacons.c
|
libbsp_a_SOURCES += console/vgacons.c
|
||||||
libbsp_a_SOURCES += console/exar17d15x.c
|
|
||||||
libbsp_a_SOURCES += console/rtd316.c
|
|
||||||
if USE_VBE_RM
|
if USE_VBE_RM
|
||||||
include_bsp_HEADERS += include/vbe3.h
|
include_bsp_HEADERS += include/vbe3.h
|
||||||
include_HEADERS += include/edid.h
|
include_HEADERS += include/edid.h
|
||||||
@@ -118,6 +105,23 @@ else
|
|||||||
libbsp_a_SOURCES += console/fb_vga.c
|
libbsp_a_SOURCES += console/fb_vga.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# console (non-graphics support)
|
||||||
|
include_HEADERS += ../../i386/shared/comm/i386_io.h
|
||||||
|
libbsp_a_SOURCES += console/serial_mouse_config.c
|
||||||
|
libbsp_a_SOURCES += ../../i386/shared/comm/uart.c
|
||||||
|
libbsp_a_SOURCES += ../../i386/shared/comm/tty_drv.c
|
||||||
|
libbsp_a_SOURCES += ../../i386/shared/realmode_int/realmode_int.c
|
||||||
|
libbsp_a_SOURCES += ../../shared/console.c
|
||||||
|
libbsp_a_SOURCES += console/console_select.c
|
||||||
|
libbsp_a_SOURCES += ../../shared/console_read.c
|
||||||
|
libbsp_a_SOURCES += ../../shared/console_write.c
|
||||||
|
libbsp_a_SOURCES += console/console_control.c
|
||||||
|
libbsp_a_SOURCES += console/conscfg.c
|
||||||
|
libbsp_a_SOURCES += console/printk_support.c
|
||||||
|
libbsp_a_SOURCES += console/exar17d15x.c
|
||||||
|
libbsp_a_SOURCES += console/rtd316.c
|
||||||
|
|
||||||
# gdb
|
# gdb
|
||||||
libbsp_a_SOURCES += ../../i386/shared/comm/i386-stub.c
|
libbsp_a_SOURCES += ../../i386/shared/comm/i386-stub.c
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ RTEMS_PROG_CCAS
|
|||||||
RTEMS_CHECK_NETWORKING
|
RTEMS_CHECK_NETWORKING
|
||||||
RTEMS_CHECK_SMP
|
RTEMS_CHECK_SMP
|
||||||
|
|
||||||
|
RTEMS_BSPOPTS_SET([BSP_ENABLE_VGA],[*],[1])
|
||||||
|
RTEMS_BSPOPTS_HELP([BSP_ENABLE_VGA],
|
||||||
|
[Set if the VGA and keyboard console support is enabled.])
|
||||||
|
AM_CONDITIONAL(RTEMS_VGA,[test "$BSP_ENABLE_VGA" = "1"])
|
||||||
|
|
||||||
RTEMS_BSPOPTS_SET([USE_COM1_AS_CONSOLE],[*],[0])
|
RTEMS_BSPOPTS_SET([USE_COM1_AS_CONSOLE],[*],[0])
|
||||||
RTEMS_BSPOPTS_HELP([USE_COM1_AS_CONSOLE],
|
RTEMS_BSPOPTS_HELP([USE_COM1_AS_CONSOLE],
|
||||||
[Determines, whether the console will be associated with the standard
|
[Determines, whether the console will be associated with the standard
|
||||||
|
|||||||
@@ -18,12 +18,17 @@
|
|||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <libchip/serial.h>
|
#include <libchip/serial.h>
|
||||||
#include <libchip/ns16550.h>
|
#include <libchip/ns16550.h>
|
||||||
|
#if BSP_ENABLE_VGA
|
||||||
#include "vgacons.h"
|
#include "vgacons.h"
|
||||||
|
#endif
|
||||||
#include <bsp/irq.h>
|
#include <bsp/irq.h>
|
||||||
#include <rtems/pci.h>
|
#include <rtems/pci.h>
|
||||||
#include <bsp/rtd316.h>
|
#include <bsp/rtd316.h>
|
||||||
|
|
||||||
|
#if BSP_ENABLE_VGA
|
||||||
#define VGA_CONSOLE_FUNCTIONS &vgacons_fns
|
#define VGA_CONSOLE_FUNCTIONS &vgacons_fns
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define COM_CONSOLE_FUNCTIONS &ns16550_fns_polled
|
#define COM_CONSOLE_FUNCTIONS &ns16550_fns_polled
|
||||||
#else
|
#else
|
||||||
@@ -54,6 +59,7 @@ static void com_set_register(uint32_t addr, uint8_t i, uint8_t val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
console_tbl Console_Configuration_Ports[] = {
|
console_tbl Console_Configuration_Ports[] = {
|
||||||
|
#if BSP_ENABLE_VGA
|
||||||
{
|
{
|
||||||
"/dev/vgacons", /* sDeviceName */
|
"/dev/vgacons", /* sDeviceName */
|
||||||
VGA_CONSOLE, /* deviceType */
|
VGA_CONSOLE, /* deviceType */
|
||||||
@@ -73,6 +79,7 @@ console_tbl Console_Configuration_Ports[] = {
|
|||||||
0X0, /* ulClock */
|
0X0, /* ulClock */
|
||||||
0x0 /* ulIntVector -- base for port */
|
0x0 /* ulIntVector -- base for port */
|
||||||
},
|
},
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
"/dev/com1", /* sDeviceName */
|
"/dev/com1", /* sDeviceName */
|
||||||
SERIAL_NS16550, /* deviceType */
|
SERIAL_NS16550, /* deviceType */
|
||||||
|
|||||||
@@ -26,7 +26,9 @@
|
|||||||
#include <rtems/termiostypes.h>
|
#include <rtems/termiostypes.h>
|
||||||
#include <libchip/serial.h>
|
#include <libchip/serial.h>
|
||||||
#include <rtems/mouse_parser.h>
|
#include <rtems/mouse_parser.h>
|
||||||
|
#if BSP_ENABLE_VGA
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
|
#endif
|
||||||
#include "../../../shared/console_private.h"
|
#include "../../../shared/console_private.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -40,6 +42,7 @@ rtems_device_driver console_control(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
#if BSP_ENABLE_VGA
|
||||||
rtems_libio_ioctl_args_t *args = arg;
|
rtems_libio_ioctl_args_t *args = arg;
|
||||||
|
|
||||||
switch (args->command) {
|
switch (args->command) {
|
||||||
@@ -60,4 +63,7 @@ rtems_device_driver console_control(
|
|||||||
|
|
||||||
args->ioctl_return = 0;
|
args->ioctl_return = 0;
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
|
#else
|
||||||
|
return rtems_termios_ioctl (arg);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include <rtems/bspIo.h>
|
#include <rtems/bspIo.h>
|
||||||
#include <rtems/keyboard.h>
|
#if BSP_ENABLE_VGA
|
||||||
|
#include <rtems/keyboard.h>
|
||||||
|
#endif
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <libchip/serial.h>
|
#include <libchip/serial.h>
|
||||||
#include <libchip/ns16550.h>
|
#include <libchip/ns16550.h>
|
||||||
@@ -36,27 +38,32 @@ int BSP_inch(void);
|
|||||||
|
|
||||||
void BSP_outch(char ch)
|
void BSP_outch(char ch)
|
||||||
{
|
{
|
||||||
if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
|
#if BSP_ENABLE_VGA
|
||||||
_IBMPC_outch( ch );
|
if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
|
||||||
} else {
|
_IBMPC_outch( ch );
|
||||||
console_tbl *cptr;
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
console_tbl *cptr;
|
||||||
|
|
||||||
cptr = &Console_Configuration_Ports[BSPPrintkPort];
|
cptr = &Console_Configuration_Ports[BSPPrintkPort];
|
||||||
cptr->pDeviceFns->deviceWritePolled( BSPPrintkPort, ch );
|
cptr->pDeviceFns->deviceWritePolled( BSPPrintkPort, ch );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int BSP_inch(void)
|
int BSP_inch(void)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
|
#if BSP_ENABLE_VGA
|
||||||
result = BSP_wait_polled_input();
|
if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
|
||||||
} else {
|
result = BSP_wait_polled_input();
|
||||||
do {
|
} else
|
||||||
result = ns16550_inbyte_nonblocking_polled( BSPPrintkPort );
|
#endif
|
||||||
} while (result == -1);
|
{
|
||||||
}
|
do {
|
||||||
|
result = ns16550_inbyte_nonblocking_polled( BSPPrintkPort );
|
||||||
|
} while (result == -1);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ $(PROJECT_INCLUDE)/rtems/$(dirstamp):
|
|||||||
@: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
@: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||||
|
|
||||||
|
if RTEMS_VGA
|
||||||
$(PROJECT_INCLUDE)/rtems/keyboard.h: console/keyboard.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
$(PROJECT_INCLUDE)/rtems/keyboard.h: console/keyboard.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/keyboard.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/keyboard.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/keyboard.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/keyboard.h
|
||||||
@@ -143,10 +144,6 @@ $(PROJECT_INCLUDE)/rtems/vgacons.h: console/vgacons.h $(PROJECT_INCLUDE)/rtems/$
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/vgacons.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/vgacons.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/vgacons.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/vgacons.h
|
||||||
|
|
||||||
$(PROJECT_INCLUDE)/i386_io.h: ../../i386/shared/comm/i386_io.h $(PROJECT_INCLUDE)/$(dirstamp)
|
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i386_io.h
|
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/i386_io.h
|
|
||||||
|
|
||||||
if USE_VBE_RM
|
if USE_VBE_RM
|
||||||
$(PROJECT_INCLUDE)/bsp/vbe3.h: include/vbe3.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
$(PROJECT_INCLUDE)/bsp/vbe3.h: include/vbe3.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/vbe3.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/vbe3.h
|
||||||
@@ -162,6 +159,11 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/fb_vesa.h
|
|||||||
|
|
||||||
else
|
else
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
$(PROJECT_INCLUDE)/i386_io.h: ../../i386/shared/comm/i386_io.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i386_io.h
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/i386_io.h
|
||||||
|
|
||||||
$(PROJECT_INCLUDE)/pcibios.h: ../../i386/shared/pci/pcibios.h $(PROJECT_INCLUDE)/$(dirstamp)
|
$(PROJECT_INCLUDE)/pcibios.h: ../../i386/shared/pci/pcibios.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/pcibios.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/pcibios.h
|
||||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/pcibios.h
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/pcibios.h
|
||||||
|
|||||||
@@ -198,6 +198,7 @@ SYM (zero_bss):
|
|||||||
repne # while ecx != 0
|
repne # while ecx != 0
|
||||||
stosl # clear a long in the bss
|
stosl # clear a long in the bss
|
||||||
|
|
||||||
|
#if BSP_ENABLE_VGA
|
||||||
/*-------------------------------------------------------------------+
|
/*-------------------------------------------------------------------+
|
||||||
| Initialize the video because zero_bss has cleared initVideo parameters
|
| Initialize the video because zero_bss has cleared initVideo parameters
|
||||||
| if it was called earlier
|
| if it was called earlier
|
||||||
@@ -208,6 +209,7 @@ SYM (zero_bss):
|
|||||||
#if USE_VBE_RM
|
#if USE_VBE_RM
|
||||||
call vesa_realmode_bootup_init
|
call vesa_realmode_bootup_init
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*---------------------------------------------------------------------+
|
/*---------------------------------------------------------------------+
|
||||||
| Check CPU type. Enable Cache and init coprocessor if needed.
|
| Check CPU type. Enable Cache and init coprocessor if needed.
|
||||||
|
|||||||
Reference in New Issue
Block a user