summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386')
-rw-r--r--c/src/lib/libbsp/i386/pc386/3c509/Makefile.am7
-rw-r--r--c/src/lib/libbsp/i386/pc386/HOWTO39
-rw-r--r--c/src/lib/libbsp/i386/pc386/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/clock/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/console.c10
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/bsp.h12
-rw-r--r--c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/start16.S24
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/ldsegs.S34
-rw-r--r--c/src/lib/libbsp/i386/pc386/timer/Makefile.am6
-rw-r--r--c/src/lib/libbsp/i386/pc386/tools/Makefile.am10
-rw-r--r--c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am4
-rw-r--r--c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am4
18 files changed, 91 insertions, 97 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am b/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
index 982f1d6b89..6c741eea90 100644
--- a/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/3c509/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,8 +23,7 @@ AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
$(PGM): $(X3c509_rel_OBJECTS)
$(make-rel)
-
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
if HAS_NETWORKING
diff --git a/c/src/lib/libbsp/i386/pc386/HOWTO b/c/src/lib/libbsp/i386/pc386/HOWTO
index 9c7a9af2b4..1bf00a3b0b 100644
--- a/c/src/lib/libbsp/i386/pc386/HOWTO
+++ b/c/src/lib/libbsp/i386/pc386/HOWTO
@@ -1,6 +1,6 @@
-
+-----------------------------------------------------------------------------+
-| RTEMS 4.0.0 PC386 BSP HOWTO - 1998/04/21 |
+| RTEMS 4.5.0 PC386 BSP HOWTO - 1998/04/21 |
+| |
+-----------------------------------------------------------------------------+
| (C) Copyright 1998 - |
| - NavIST Group - Real-Time Distributed Systems and Industrial Automation |
@@ -14,6 +14,11 @@
| This file is provided "AS IS" without warranty of any kind, either |
| expressed or implied. |
+-----------------------------------------------------------------------------+
+| History: |
+| 12 June 2000 - Updated to 4.5 (Joel) |
++-----------------------------------------------------------------------------+
+
+CVS Revision: $Id$
1. Introduction
@@ -37,31 +42,24 @@ substituted by the real thing!
------------------------------------------------
Obtaining, building and installing the tools for building the
-PC386 BSP of RTEMS is covered in detail in the 'RTEMS 4.0.0 On-Line
-Library' -> 'Getting Started with RTEMS for C/C++ Users' -> 'Building
-the GNU C/C++ Cross Compiler Toolset'.
+PC386 BSP of RTEMS is covered in detail in the 'RTEMS 4.5.0 On-Line
+Library' -> 'Getting Started with RTEMS for C/C++ Users'. You can
+either use pre-built toolset executables or build your own from
+the instructions given there.
- When running the 'bit' script you should specift the argumetn as
-either:
-
- + 'i386-elf' to indicate an 'i386-rtemself' toolset, or
- + 'i386' to indicate an 'i386-rtems' toolset.
+ This BSP is designed to work only with ELF toolset configurations.
+This is format used by the i386-rtems target.
4. Building RTEMS
-----------------
Obtaining, building and installing the tools for building the
-PC386 BSP is covered in detail in the 'RTEMS 4.0.0 On-Line Library' ->
+PC386 BSP is covered in detail in the 'RTEMS 4.5.0 On-Line Library' ->
'Getting Started with RTEMS for C/C++ Users' -> 'Building RTEMS'.
When running configure, use the following values for the listed
-options:
-
- + with an i386-rtemself toolset
- --target=i386-rtemself
- --enable-rtemsbsp=pc386
+options with an i386-rtems toolset:
- + with an i386-rtems toolset
--target=i386-rtems
--enable-rtemsbsp=pc386
@@ -116,11 +114,10 @@ and run your PC386 BSP samples, tests and programs.
You can get the latest release of GRUB from its homepage:
- - http://www.uruk.org/grub/
-
-or alternatively by ftp from:
+ - http://www.gnu.org/grub/
- - ftp://ftp.uruk.org/public/grub/
+NOTE: The former location was http://www.uruk.org/grub and ftp from
+ ftp://ftp.uruk.org/public/grub.
Once you obtain the .tar.gz archive 'grub-0.4.tar.gz', change to a
temporary directory (you won't need the grub files after this and can
diff --git a/c/src/lib/libbsp/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am
index c332929df0..5b350eb638 100644
--- a/c/src/lib/libbsp/i386/pc386/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/i386/pc386/clock/Makefile.am b/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
index c8a411e6de..131b243ca6 100644
--- a/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -19,7 +19,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(clock_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(clock_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/pc386/console/Makefile.am b/c/src/lib/libbsp/i386/pc386/console/Makefile.am
index 1846bc26c1..c845b25351 100644
--- a/c/src/lib/libbsp/i386/pc386/console/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -23,7 +23,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(console_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(console_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/pc386/console/console.c b/c/src/lib/libbsp/i386/pc386/console/console.c
index 8da96684d7..fff960eb91 100644
--- a/c/src/lib/libbsp/i386/pc386/console/console.c
+++ b/c/src/lib/libbsp/i386/pc386/console/console.c
@@ -104,16 +104,6 @@ isr_is_on(const rtems_irq_connect_data *irq)
return BSP_irq_enabled_at_i8259s(irq->name);
}
-void console_reserve_resources(rtems_configuration_table *conf)
-{
- if(BSPConsolePort != BSP_CONSOLE_PORT_CONSOLE)
- {
- rtems_termios_reserve_resources(conf, 1);
- }
-
- return;
-}
-
void __assert (const char *file, int line, const char *msg)
{
static char exit_msg[] = "EXECUTIVE SHUTDOWN! Any key to reboot...";
diff --git a/c/src/lib/libbsp/i386/pc386/include/Makefile.am b/c/src/lib/libbsp/i386/pc386/include/Makefile.am
index 332b5955cd..2f4544274f 100644
--- a/c/src/lib/libbsp/i386/pc386/include/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/include/bsp.h b/c/src/lib/libbsp/i386/pc386/include/bsp.h
index e469d2b14d..dc1d2e497e 100644
--- a/c/src/lib/libbsp/i386/pc386/include/bsp.h
+++ b/c/src/lib/libbsp/i386/pc386/include/bsp.h
@@ -54,6 +54,15 @@ extern "C" {
#include <bspIo.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
+#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
+
+/*
* Network driver configuration
*/
@@ -134,6 +143,8 @@ extern int rtems_dec21140_driver_attach (struct rtems_bsdnet_ifconfig *config);
#define Clear_tm27_intr()
#define Lower_tm27_intr()
+/* does anyone need this? if so, report it so we can rename this macro */
+#if 0
/*-------------------------------------------------------------------------+
| Simple spin delay in microsecond units for device drivers.
| This is very dependent on the clock speed of the target.
@@ -143,6 +154,7 @@ extern int rtems_dec21140_driver_attach (struct rtems_bsdnet_ifconfig *config);
rtems_unsigned32 _cnt = _microseconds; \
asm volatile ("0: nop; mov %0,%0; loop 0b" : "=c"(_cnt) : "0"(_cnt)); \
}
+#endif
/*-------------------------------------------------------------------------+
| Convert microseconds to ticks and ticks to microseconds.
diff --git a/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am b/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
index e68eeeb6dc..ef41a484d9 100644
--- a/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/ne2000/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -21,7 +21,7 @@ AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
$(PGM): $(ne2000_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
if HAS_NETWORKING
diff --git a/c/src/lib/libbsp/i386/pc386/start/Makefile.am b/c/src/lib/libbsp/i386/pc386/start/Makefile.am
index f8e467dab2..2d530c6695 100644
--- a/c/src/lib/libbsp/i386/pc386/start/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/start/start16.S b/c/src/lib/libbsp/i386/pc386/start/start16.S
index d9aea202f3..520895de47 100644
--- a/c/src/lib/libbsp/i386/pc386/start/start16.S
+++ b/c/src/lib/libbsp/i386/pc386/start/start16.S
@@ -109,16 +109,16 @@ _start16:
outb %al, $0x60
call empty_8042
- call delay
- call delay
- call delay
+ call pc386_delay
+ call pc386_delay
+ call pc386_delay
movl %cs:HDRSTART + HDROFF, %eax #
pushl %eax # jump to start of 32 bit code
ret #
/*----------------------------------------------------------------------------+
-| delay
+| pc386_delay
+------------------------------------------------------------------------------
| Delay is needed after doing I/O.
|
@@ -131,10 +131,10 @@ _start16:
| NOTE: Saving the content of the EAX register just in case. - Rosimildo.
+----------------------------------------------------------------------------*/
.p2align 4
- .globl _delay
- .globl delay
-delay:
-_delay:
+ .globl _pc386_delay
+ .globl pc386_delay
+pc386_delay:
+_pc386_delay:
pushl %eax
#if defined(USE_OUTB_FOR_DELAY)
outb %al, $0x80 # about 1uS delay on most machines
@@ -142,9 +142,9 @@ _delay:
#else
movl $0x200, %eax
-delay1:
+pc386_delay1:
dec %eax
- jnz delay1
+ jnz pc386_delay1
#endif
popl %eax
ret
@@ -162,11 +162,11 @@ delay1:
.globl empty_8042
empty_8042:
_empty_8042:
- call delay
+ call pc386_delay
inb $0x64, %al # 8042 status port
testb $0x01, %al # output buffer?
jz no_output
- call delay
+ call pc386_delay
in $0x60, %al # read it
jmp empty_8042
no_output:
diff --git a/c/src/lib/libbsp/i386/pc386/startup/Makefile.am b/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
index ac225d520b..a634ef5724 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index dc2a24debb..e443b31402 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -163,7 +163,7 @@ void bsp_start_default( void )
Cpu_table.do_zero_of_workspace = TRUE;
Cpu_table.interrupt_table_segment = get_ds();
Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table;
- Cpu_table.interrupt_stack_size = 4096;
+ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
Cpu_table.extra_mpci_receive_server_stack = 0;
/* Place RTEMS workspace at beginning of free memory. */
@@ -174,8 +174,6 @@ void bsp_start_default( void )
BSP_Configuration.work_space_start = (void *)rtemsFreeMemStart;
rtemsFreeMemStart += BSP_Configuration.work_space_size;
- console_reserve_resources(&BSP_Configuration);
-
/*
* Init rtems interrupt management
*/
diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index 87fc02f0f4..6d7ec06022 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -50,7 +50,7 @@ BEGIN_CODE
EXTERN (clockOff)
/*----------------------------------------------------------------------------+
-| delay
+| pc386_delay
+------------------------------------------------------------------------------
| Delay is needed after doing I/O.
|
@@ -64,17 +64,17 @@ BEGIN_CODE
#define DELAY_USE_OUTB
.p2align 4
- .globl _delay
- .globl delay
-delay:
-_delay:
+ .globl _pc386_delay
+ .globl pc386_delay
+pc386_delay:
+_pc386_delay:
#ifdef DELAY_USE_OUTB
outb al, $0x80 # about 1uS delay on most machines
#else
movl $0x200, eax
-delay1:
+pc386_delay1:
dec eax
- jnz delay1
+ jnz pc386_delay1
#endif
ret
@@ -123,36 +123,36 @@ next_step:
movb $0x11, al /* initialization sequence */
outb al, $0x20 /* send it to 8259A-1 */
- call SYM(delay)
+ call SYM(pc386_delay)
outb al, $0xA0 /* and to 8259A-2 */
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x20, al /* start of hardware int's (0x20) */
outb al, $0x21
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x28, al /* start of hardware int's 2 (0x28) */
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x04, al /* 8259-1 is master */
outb al, $0x21
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x02, al /* 8259-2 is slave */
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0x01, al /* 8086 mode for both */
outb al, $0x21
- call SYM(delay)
+ call SYM(pc386_delay)
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0xFF, al /* mask off all interrupts for now */
outb al, $0xA1
- call SYM(delay)
+ call SYM(pc386_delay)
movb $0xFB, al /* mask all irq's but irq2 which */
outb al, $0x21 /* is cascaded */
- call SYM(delay)
+ call SYM(pc386_delay)
movw $0xFFFB, SYM(i8259s_cache) /* set up same values in cache */
diff --git a/c/src/lib/libbsp/i386/pc386/timer/Makefile.am b/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
index 5e87c956a3..df08f6e87d 100644
--- a/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -20,7 +20,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am
$(PGM): $(timer_rel_OBJECTS)
$(make-rel)
-# the .rel file built here will be put into libbsp.a by
+# the .rel file built here will be put into libbsp.a by
# ../wrapup/Makefile
all-local: $(ARCH) $(timer_rel_OBJECTS) $(PGM)
diff --git a/c/src/lib/libbsp/i386/pc386/tools/Makefile.am b/c/src/lib/libbsp/i386/pc386/tools/Makefile.am
index 43049dd3b7..e6ce930223 100644
--- a/c/src/lib/libbsp/i386/pc386/tools/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/tools/Makefile.am
@@ -7,8 +7,7 @@ ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
EXTRA_DIST = Spec.doc
-noinst_PROGRAMS = \
-bin2boot
+noinst_PROGRAMS = bin2boot
bin2boot_SOURCES = bin2boot.c
@@ -18,11 +17,10 @@ bin2boot_SOURCES = bin2boot.c
@PROJECT_RELEASE@/build-tools/bin2boot$(EXEEXT): bin2boot$(EXEEXT)
$(INSTALL_PROGRAM) $< $@
-PREINSTALL_FILES = \
-@PROJECT_RELEASE@/build-tools \
-@PROJECT_RELEASE@/build-tools/bin2boot$(EXEEXT)
+PREINSTALL_FILES += @PROJECT_RELEASE@/build-tools \
+ @PROJECT_RELEASE@/build-tools/bin2boot$(EXEEXT)
## HACK: install into build-tree
all-local: $(PREINSTALL_FILES)
-include $(top_srcdir)/../../../../../../../automake/local.am
+include $(top_srcdir)/../../../../../../../automake/host.am
diff --git a/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am b/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
index fafd810eb4..24abfa1c65 100644
--- a/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/wd8003/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am b/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
index 25c26d5fa9..9250a7c3cd 100644
--- a/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4