Compare commits

..

1 Commits
4.9.1 ... 4.9.0

Author SHA1 Message Date
cvs2git
364e64d2a0 This commit was manufactured by cvs2svn to create tag 'rtems-4-9-0'.
Sprout from rtems-4-9-branch 2008-09-24 17:16:13 UTC Joel Sherrill <joel.sherrill@OARcorp.com> '2008-09-24	Joel Sherrill <joel.sherrill@OARcorp.com>'
Cherrypick from rtems-4-9-branch 2009-09-15 05:32:51 UTC cvs2git <rtems-devel@rtems.org> 'This commit was manufactured by cvs2svn to create branch 'rtems-4-9-branch'.':
    c/src/lib/libbsp/arm/smdk2410/include/.cvsignore
    c/src/lib/libbsp/m68k/genmcf548x/include/.cvsignore
    c/src/lib/libbsp/m68k/mcf52235/include/.cvsignore
    c/src/lib/libbsp/m68k/mcf5329/include/.cvsignore
    c/src/lib/libbsp/powerpc/mvme3100/include/.cvsignore
    c/src/lib/libbsp/powerpc/virtex/include/.cvsignore
2009-09-15 05:32:52 +00:00
445 changed files with 5159 additions and 51187 deletions

View File

@@ -1,8 +1,3 @@
2008-10-01 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1324/bsps
* aclocal/check-bsps.m4: Adopt icecube changes from CVS-HEAD.
2008-09-24 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.maint: Bump rtems_api to 4.9.

View File

@@ -4,4 +4,4 @@
# $Id$
#
RTEMS Version 4.9.1
RTEMS Version 4.9.0

View File

@@ -26,9 +26,9 @@ AC_MSG_CHECKING([for available BSPs])
bsps="$bsps mbx860_002"
bsps="$bsps mbx860_005b"
;;
gen5200) bsps="pm520_cr825 pm520_ze30 brs5l icecube";;
gen5200) bsps="pm520_cr825 pm520_ze30 brs5l";;
mpc55xxevb) bsps="mpc5566evb";;
gen83xx) bsps="mpc8349eamds hsc_cm01 mpc8313erdb";;
gen83xx) bsps="mpc8349eamds hsc_cm01 mpc8313erdb icecube";;
motorola_powerpc) bsps="mvme2307 mcp750 mtx603e mvme2100";;
pc386) bsps="pc386 pc386dx pc486 pc586 pc686 pck6";;
erc32) bsps="erc32 sis";;

View File

@@ -1,4 +1,4 @@
AC_DEFUN([RTEMS_VERSIONING],
m4_define([_RTEMS_VERSION],[4.9.1]))
m4_define([_RTEMS_VERSION],[4.9.0]))
m4_define([RTEMS_API],[4.9])

View File

@@ -1,8 +1,3 @@
2008-11-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libchip/serial/ns16550.c: Transmit the character in the polled write
function within a critical section for printk() compatibility.
2008-09-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/prog-cc.m4: Remove pre-production testing CFLAGS.

View File

@@ -1,4 +1,4 @@
AC_DEFUN([RTEMS_VERSIONING],
m4_define([_RTEMS_VERSION],[4.9.1]))
m4_define([_RTEMS_VERSION],[4.9.0]))
m4_define([RTEMS_API],[4.9])

View File

@@ -1,23 +1,3 @@
2008-09-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* support/timer_driver.adb, support/timer_driver.ads,
tmtests/tm01/tmtest.adb, tmtests/tm02/tmtest.adb,
tmtests/tm03/tmtest.adb, tmtests/tm04/tmtest.adb,
tmtests/tm05/tmtest.adb, tmtests/tm06/tmtest.adb,
tmtests/tm07/tmtest.adb, tmtests/tm08/tmtest.adb,
tmtests/tm09/tmtest.adb, tmtests/tm10/tmtest.adb,
tmtests/tm11/tmtest.adb, tmtests/tm12/tmtest.adb,
tmtests/tm13/tmtest.adb, tmtests/tm14/tmtest.adb,
tmtests/tm15/tmtest.adb, tmtests/tm16/tmtest.adb,
tmtests/tm17/tmtest.adb, tmtests/tm18/tmtest.adb,
tmtests/tm19/tmtest.adb, tmtests/tm20/config.h,
tmtests/tm20/tmtest.adb, tmtests/tm21/tmtest.adb,
tmtests/tm22/tmtest.adb, tmtests/tm23/tmtest.adb,
tmtests/tm24/tmtest.adb, tmtests/tm25/tmtest.adb,
tmtests/tm28/tmtest.adb, tmtests/tm29/tmtest.adb,
tmtests/tmck/tmtest.adb, tmtests/tmoverhd/tmtest.adb: Clean up.
Verified to run on psim with gcc 4.3.2.
2008-06-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* samples/hello/config.h, sptests/spname01/config.h: These needed

View File

@@ -20,21 +20,9 @@
--
with RTEMS;
with Interfaces.C;
package body Timer_Driver is
--PAGE
--
-- Empty_function
--
--
procedure Empty_Function
is
begin
Null;
end Empty_Function;
--PAGE
--
-- Set_Find_Average_Overhead
@@ -45,18 +33,12 @@ package body Timer_Driver is
Find_Flag : in Standard.Boolean
) is
procedure Set_Find_Average_Overhead_base (
Find_Flag : in Interfaces.Unsigned_8
Find_Flag : in RTEMS.Boolean
);
pragma Import (C, Set_Find_Average_Overhead_base,
"benchmark_timer_disable_subtracting_average_overhead");
c: Interfaces.Unsigned_8;
"Set_find_average_overhead");
begin
if Find_Flag then
c := 1;
else
c := 0;
end if;
Set_Find_Average_Overhead_base (c);
Set_Find_Average_Overhead_base (RTEMS.From_Ada_Boolean (Find_Flag));
end Set_Find_Average_Overhead;
end Timer_Driver;

View File

@@ -32,7 +32,7 @@ package Timer_Driver is
--
procedure Initialize;
pragma Import (C, Initialize, "benchmark_timer_initialize");
pragma Import (C, Initialize, "Timer_initialize");
--
-- Read_Timer
@@ -46,7 +46,7 @@ package Timer_Driver is
function Read_Timer
return RTEMS.Unsigned32;
pragma Import (C, Read_Timer, "benchmark_timer_read");
pragma Import (C, Read_Timer, "Read_timer");
--
-- Empty_Function
@@ -60,6 +60,7 @@ package Timer_Driver is
--
procedure Empty_Function;
pragma Import (C, Empty_Function, "Empty_function");
--
-- Set_Find_Average_Overhead

View File

@@ -266,8 +266,6 @@ package body TMTEST is
SEMAPHORE_RELEASE_LOOP_TIME * 2,
RTEMS_CALLING_OVERHEAD.SEMAPHORE_RELEASE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 1 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_1;

View File

@@ -199,7 +199,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.SEMAPHORE_OBTAIN
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 2 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LOW_TASK;

View File

@@ -179,7 +179,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.SEMAPHORE_RELEASE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 3 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -399,7 +399,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.TASK_DELETE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 4 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -119,7 +119,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.TASK_RESUME
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 5 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -185,7 +185,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.TASK_DELETE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 6 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_1;

View File

@@ -120,7 +120,6 @@ package body TMTEST is
RTEMS.TASK_SUSPEND( RTEMS.SELF, STATUS );
end if;
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 07 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -307,7 +307,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.CLOCK_GET
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 8 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TEST_TASK;

View File

@@ -109,7 +109,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_DELETE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 9 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TEST_TASK;

View File

@@ -215,7 +215,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_RECEIVE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 10 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LOW_TASK;

View File

@@ -175,7 +175,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_SEND
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 11 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -174,7 +174,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_SEND
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 12 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -173,7 +173,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_URGENT
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 13 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -180,7 +180,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_URGENT
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 14 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -237,7 +237,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.EVENT_SEND
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 15 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LOW_TASK;

View File

@@ -188,7 +188,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.EVENT_SEND
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 16 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end HIGH_TASK;

View File

@@ -151,7 +151,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.TASK_SET_PRIORITY
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 17 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LAST_TASK;

View File

@@ -145,7 +145,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.TASK_DELETE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 18 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LAST_TASK;

View File

@@ -277,7 +277,6 @@ package body TMTEST is
0
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 19 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_3;

View File

@@ -22,7 +22,6 @@
#define CONFIGURE_MAXIMUM_PARTITIONS 1
#define CONFIGURE_MAXIMUM_REGIONS 1
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_TICKS_PER_TIMESLICE 0
#define CONFIGURE_POSIX_INIT_THREAD_TABLE

View File

@@ -393,7 +393,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.REGION_DELETE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 20 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_1;

View File

@@ -293,7 +293,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_IDENT
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 21 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_1;

View File

@@ -218,7 +218,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.MESSAGE_QUEUE_BROADCAST
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 22 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LOW_TASK;

View File

@@ -389,7 +389,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.TASK_WAKE_WHEN
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 23 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LOW_TASK;

View File

@@ -151,7 +151,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.TASK_WAKE_AFTER
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 24 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end if;

View File

@@ -148,7 +148,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.CLOCK_TICK
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 25 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LOW_TASK;

View File

@@ -167,7 +167,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.PORT_DELETE
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 28 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TEST_TASK;

View File

@@ -224,7 +224,6 @@ package body TMTEST is
RTEMS_CALLING_OVERHEAD.RATE_MONOTONIC_PERIOD
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST 29 ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end LOW_TASK;

View File

@@ -152,7 +152,6 @@ TEST_SUPPORT.PAUSE;
0
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST CHECK ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_1;

View File

@@ -1396,7 +1396,6 @@ TEST_SUPPORT.PAUSE;
0
);
TEXT_IO.PUT_LINE( "*** END OF TIME TEST OVERHEAD ***" );
RTEMS.SHUTDOWN_EXECUTIVE( 0 );
end TASK_1;

View File

@@ -1,14 +1,3 @@
2008-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1345/Ada
* rtems.ads: RTEMS boolean type is now C99 bool which is not an
unsigned32.
2008-11-20 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1339/Ada
* rtems.adb, rtems.ads: Re-add IO Manager to Ada binding.
2008-05-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems.adb, rtems.ads: Fix prototype.

View File

@@ -22,6 +22,7 @@
with Ada;
with Ada.Unchecked_Conversion;
with System;
with Interfaces; use Interfaces;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings; use Interfaces.C.Strings;
@@ -37,7 +38,7 @@ package body RTEMS is
) return RTEMS.Boolean is
begin
if Ada_Boolean then
if Ada_Boolean = Standard.True then
return RTEMS.True;
end if;
@@ -1733,145 +1734,6 @@ package body RTEMS is
end Port_Internal_To_External;
--
-- Input/Output Manager
--
procedure IO_Register_Name (
Name : in String;
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Result : out RTEMS.Status_Codes
) is
function IO_Register_Name_Base (
Name : Interfaces.C.Char_Array;
Major : RTEMS.Device_Major_Number;
Minor : RTEMS.Device_Minor_Number
) return RTEMS.Status_Codes;
pragma Import (C, IO_Register_Name_Base, "rtems_io_register_name");
begin
Result :=
IO_Register_Name_Base ( Interfaces.C.To_C (Name), Major, Minor );
end IO_Register_Name;
procedure IO_Lookup_Name (
Name : in String;
Device_Info : out RTEMS.Driver_Name_t;
Result : out RTEMS.Status_Codes
) is
function IO_Lookup_Name_Base (
Name : Interfaces.C.Char_Array;
Device_Info : access RTEMS.Driver_Name_t
) return RTEMS.Status_Codes;
pragma Import (C, IO_Lookup_Name_Base, "rtems_io_lookup_name");
Device_Info_Base : aliased RTEMS.Driver_Name_t;
begin
Result := IO_Lookup_Name_Base (
Interfaces.C.To_C (Name),
Device_Info_Base'Unchecked_Access
);
Device_Info := Device_Info_Base;
end IO_Lookup_Name;
procedure IO_Open (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
) is
function IO_Open_Base (
Major : RTEMS.Device_Major_Number;
Minor : RTEMS.Device_Minor_Number;
Argument : RTEMS.Address
) return RTEMS.Status_Codes;
pragma Import (C, IO_Open_Base, "rtems_io_open");
begin
Result := IO_Open_Base (Major, Minor, Argument);
end IO_Open;
pragma Inline (IO_Open);
procedure IO_Close (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
) is
function IO_Close_Base (
Major : RTEMS.Device_Major_Number;
Minor : RTEMS.Device_Minor_Number;
Argument : RTEMS.Address
) return RTEMS.Status_Codes;
pragma Import (C, IO_Close_Base, "rtems_io_close");
begin
Result := IO_Close_Base (Major, Minor, Argument);
end IO_Close;
pragma Inline (IO_Close);
procedure IO_Read (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
) is
function IO_Read_Base (
Major : RTEMS.Device_Major_Number;
Minor : RTEMS.Device_Minor_Number;
Argument : RTEMS.Address
) return RTEMS.Status_Codes;
pragma Import (C, IO_Read_Base, "rtems_io_read");
begin
Result := IO_Read_Base (Major, Minor, Argument);
end IO_Read;
pragma Inline (IO_Read);
procedure IO_Write (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
) is
function IO_Write_Base (
Major : RTEMS.Device_Major_Number;
Minor : RTEMS.Device_Minor_Number;
Argument : RTEMS.Address
) return RTEMS.Status_Codes;
pragma Import (C, IO_Write_Base, "rtems_io_write");
begin
Result := IO_Write_Base (Major, Minor, Argument);
end IO_Write;
pragma Inline (IO_Write);
procedure IO_Control (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
) is
function IO_Control_Base (
Major : RTEMS.Device_Major_Number;
Minor : RTEMS.Device_Minor_Number;
Argument : RTEMS.Address
) return RTEMS.Status_Codes;
pragma Import (C, IO_Control_Base, "rtems_io_control");
begin
Result := IO_Control_Base (Major, Minor, Argument);
end IO_Control;
pragma Inline (IO_Control);
--
-- Fatal Error Manager
@@ -2237,7 +2099,7 @@ package body RTEMS is
Name : chars_ptr
) return RTEMS.Status_Codes;
pragma Import (C, Object_Set_Name_Base, "rtems_object_set_name");
NameAsCString : constant chars_ptr := New_String(Name);
NameAsCString : chars_ptr := New_String(Name);
begin
Result := Object_Set_Name_Base (ID, NameAsCString);
end Object_Set_Name;
@@ -2370,8 +2232,8 @@ package body RTEMS is
API : RTEMS.Unsigned32
) return chars_ptr;
pragma Import (C, Object_Get_API_Name_Base, "rtems_object_get_api_name");
Result : constant chars_ptr := Object_Get_API_Name_Base (API);
APIName : constant String := Value_Without_Exception (Result);
Result : chars_ptr := Object_Get_API_Name_Base (API);
APIName : String := Value_Without_Exception (Result);
begin
Name := APIName;
end Object_Get_API_Name;
@@ -2387,9 +2249,8 @@ package body RTEMS is
) return chars_ptr;
pragma Import
(C, Object_Get_API_Class_Name_Base, "rtems_object_get_api_class_name");
Result : constant
chars_ptr := Object_Get_API_Class_Name_Base (The_API, The_Class);
ClassName : constant String := Value_Without_Exception (Result);
Result : chars_ptr := Object_Get_API_Class_Name_Base (The_API, The_Class);
ClassName : String := Value_Without_Exception (Result);
begin
Name := ClassName;
end Object_Get_API_Class_Name;

View File

@@ -45,7 +45,7 @@ pragma Elaborate_Body (RTEMS);
type Unsigned8_Pointer is access all RTEMS.Unsigned8;
type Signed32_Pointer is access all RTEMS.Signed32;
subtype Boolean is RTEMS.Unsigned8;
subtype Boolean is RTEMS.Unsigned32;
subtype Address is System.Address;
subtype Single is Interfaces.C.C_float;
subtype Double is Interfaces.C.Double;
@@ -58,7 +58,7 @@ pragma Elaborate_Body (RTEMS);
Unsigned8_Bits : constant := 7;
Unsigned16_Bits : constant := 15;
Unsigned32_Bits : constant := 31;
Boolean_Bits : constant := 7;
Boolean_Bits : constant := 31;
Address_Bits : constant := 31;
Single_Bits : constant := 31;
Double_Bits : constant := 63;
@@ -66,7 +66,7 @@ pragma Elaborate_Body (RTEMS);
Unsigned8_Units : constant := 1;
Unsigned16_Units : constant := 2;
Unsigned32_Units : constant := 4;
Boolean_Units : constant := 1;
Boolean_Units : constant := 4;
Address_Units : constant := 4;
Single_Units : constant := 4;
Double_Units : constant := 8;
@@ -99,16 +99,6 @@ pragma Elaborate_Body (RTEMS);
subtype Node is RTEMS.Unsigned32;
type Driver_Name_t is
record
Device_Name : RTEMS.Address;
Device_Name_Length : RTEMS.Unsigned32;
Major : RTEMS.Device_Major_Number;
Minor : RTEMS.Device_Minor_Number;
end record;
--
-- Task Related Types
--
@@ -1171,63 +1161,6 @@ pragma Elaborate_Body (RTEMS);
Result : out RTEMS.Status_Codes
);
--
-- Input/Output Manager
--
procedure IO_Register_Name (
Name : in String;
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Result : out RTEMS.Status_Codes
);
procedure IO_Lookup_Name (
Name : in String;
Device_Info : out RTEMS.Driver_Name_t;
Result : out RTEMS.Status_Codes
);
procedure IO_Open (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
);
pragma Inline (IO_Open);
procedure IO_Close (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
);
pragma Inline (IO_Close);
procedure IO_Read (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
);
pragma Inline (IO_Read);
procedure IO_Write (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
);
pragma Inline (IO_Write);
procedure IO_Control (
Major : in RTEMS.Device_Major_Number;
Minor : in RTEMS.Device_Minor_Number;
Argument : in RTEMS.Address;
Result : out RTEMS.Status_Codes
);
pragma Inline (IO_Control);
--
-- Fatal Error Manager
--

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-08-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am: No BSP should use exit.c as a file name. exit() is POSIX

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic -N}
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-08-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am: No BSP should use exit.c as a file name. exit() is POSIX

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic -N}
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-05 Ralf Corsepius <ralf.corsepius@rtems.org>
* timer/timer.c: Use "true" instead of "1" for "bool"s.

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic -N}
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -1,13 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* console/defaultfont.c: Remove (Renamed into console/defaultfont.h).
* console/defaultfont.h: New (Renamed from console/defaultfont.c).
* Makefile.am, console/conio.c: Reflect renamer.
2008-09-24 Ralf Corsepius <ralf.corsepius@rtems.org>
* Makefile.am: Remove empty HAS_NETWORKING conditional.

View File

@@ -43,7 +43,7 @@ startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
../../shared/gnatinstallhandler.c
clock_SOURCES = clock/clockdrv.c
console_SOURCES = console/conio.c console/console.c \
console/defaultfont.h
console/defaultfont.c
timer_SOURCES = timer/timer.c
include_HEADERS += irq/irq.h

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -Bstatic -N}
%{!qrtems: %(old_link)} %{qrtems: -Qy -dc -dp -Bstatic -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -92,7 +92,7 @@ int _textattr; /**< Text attribute */
/*---------------------------------------------------------------------------*
* Defaultfont *
*---------------------------------------------------------------------------*/
#include "defaultfont.h"
#include "defaultfont.c"
/**
* @brief gba_gotoxy function set screeen xy-coordinates

View File

@@ -1,11 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove noinst_PROGRAMS (Unused).
2008-08-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am: No BSP should use exit.c as a file name. exit() is POSIX

View File

@@ -15,6 +15,7 @@ include_HEADERS += include/tm27.h
nodist_include_HEADERS = include/bspopts.h
DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS =
nodist_include_HEADERS += ../../shared/include/coverhd.h

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-05 Ralf Corsepius <ralf.corsepius@rtems.org>
* block/block.c, rtc/rtc.c: Convert to "bool".

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -Bstatic -N}
%{!qrtems: %(old_link)} %{qrtems: -Qy -dc -dp -Bstatic -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am: Rework to avoid .rel files.

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -1,11 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove noinst_PROGRAMS (Unused).
2008-09-24 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1322/bsps

View File

@@ -15,6 +15,7 @@ include_HEADERS += ../../shared/include/tm27.h
nodist_include_HEADERS = include/bspopts.h
DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS =
nodist_include_HEADERS += ../../shared/include/coverhd.h
EXTRA_DIST = ../gp32/start/start.S

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

View File

@@ -1,7 +1,3 @@
2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Cleanup.
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* include/bsp.h: Eliminate copies of the Configuration Table. Use the

View File

@@ -14,9 +14,46 @@ include_HEADERS += include/tm27.h
nodist_include_HEADERS = include/bspopts.h
DISTCLEANFILES = include/bspopts.h
nodist_include_HEADERS += ../shared/include/coverhd.h
nodist_include_HEADERS += $(top_srcdir)/../shared/include/coverhd.h
all-local: $(PREINSTALL_FILES)
EXTRA_DIST = build-tools do-bare-bsp-build
include $(srcdir)/preinstall.am
PREINSTALL_DIRS =
PREINSTALL_FILES =
$(PROJECT_INCLUDE)/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)
@: > $(PROJECT_INCLUDE)/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
$(PROJECT_LIB)/$(dirstamp):
@$(MKDIR_P) $(PROJECT_LIB)
@: > $(PROJECT_LIB)/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
$(PROJECT_INCLUDE)/coverhd.h: $(top_srcdir)/../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
CLEANFILES = $(PREINSTALL_FILES)
DISTCLEANFILES += $(PREINSTALL_DIRS)
include $(top_srcdir)/../../../automake/local.am

View File

@@ -1,45 +0,0 @@
## Automatically generated by ampolish3 - Do not edit
if AMPOLISH3
$(srcdir)/preinstall.am: Makefile.am
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
endif
PREINSTALL_DIRS =
DISTCLEANFILES += $(PREINSTALL_DIRS)
all-am: $(PREINSTALL_FILES)
PREINSTALL_FILES =
CLEANFILES = $(PREINSTALL_FILES)
$(PROJECT_LIB)/$(dirstamp):
@$(MKDIR_P) $(PROJECT_LIB)
@: > $(PROJECT_LIB)/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
$(PROJECT_INCLUDE)/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)
@: > $(PROJECT_INCLUDE)/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
$(PROJECT_INCLUDE)/coverhd.h: ../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-08-15 Allan Hessenflow <allanh@kallisti.com>
* ChangeLog, Makefile.am, README, bsp_specs, configure.ac,

View File

@@ -4,7 +4,7 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s -e __start}}
%{!nostdlib: %{qrtems: start.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e __start}

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-08-18 Allan Hessenflow <allanh@kallisti.com>
* Makefile.am, console/console-io.c, startup/bspstart.c: Update to use

View File

@@ -4,7 +4,7 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s -e __start}}
%{!nostdlib: %{qrtems: start.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e __start}

View File

@@ -1,11 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove noinst_PROGRAMS (Unused).
2008-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* startup/__main.c: Add missing prototypes.

View File

@@ -14,6 +14,7 @@ include_HEADERS += include/tm27.h
nodist_include_HEADERS = include/bspopts.h
DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS =
nodist_include_HEADERS += ../../shared/include/coverhd.h

View File

@@ -4,8 +4,8 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s -e _start}}
%{!nostdlib: %{qrtems: start.o%s}}
*link:
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}

View File

@@ -1,11 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/ckinit.c: The Shared Memory Driver no longer requires the

View File

@@ -4,7 +4,7 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s -e reset}}
%{!nostdlib: %{qrtems: start.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e reset}

View File

@@ -1,4 +1,18 @@
/*
/* Timer_init()
*
* This routine initializes the timer on the FORCE CPU-386 board.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: This routine will not work if the optimizer is enabled
* for some compilers. The multiple writes to the Z8036
* may be optimized away.
*
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*

View File

@@ -1,20 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1344/bsps
* clock/ckinit.c: Committed code was not final. Corrections.
2008-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
Michael South <msouth@msouth.org>
PR 1344/bsps
* configure.ac, clock/ckinit.c, timer/timer.c: Add use of TSC for
nanoseconds granularity. i8254 is very slow on some systems. TSC use
is auto-detected by default.
2008-09-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* ide/ide.c: Convert to "bool".

View File

@@ -7,7 +7,7 @@ crtend.o%s crtn.o%s
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}

View File

@@ -24,7 +24,6 @@
#include <bsp.h>
#include <bsp/irq.h>
#include <bspopts.h>
#include <libcpu/cpuModel.h>
#define CLOCK_VECTOR 0
@@ -32,46 +31,12 @@ volatile uint32_t pc386_microseconds_per_isr;
volatile uint32_t pc386_isrs_per_tick;
uint32_t pc386_clock_click_count;
/*
* Roughly the number of cycles per tick and per nanosecond. Note that these
* will be wildly inaccurate if the chip speed changes due to power saving
* or thermal modes.
*
* NOTE: These are only used when the TSC method is used.
*/
uint64_t pc586_tsc_per_tick;
uint64_t pc586_nanoseconds_per_tick;
uint64_t pc586_tsc_at_tick;
/* this driver may need to count ISRs per tick */
#define CLOCK_DRIVER_ISRS_PER_TICK pc386_isrs_per_tick
#define READ_8254( _lsb, _msb ) \
do { outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_LATCH); \
inport_byte(TIMER_CNTR0, _lsb); \
inport_byte(TIMER_CNTR0, _msb); \
} while (0)
/*
* Hooks which get swapped based upon which nanoseconds since last
* tick method is preferred.
*/
void (*Clock_driver_support_at_tick)(void) = NULL;
uint32_t (*Clock_driver_nanoseconds_since_last_tick)(void) = NULL;
/*
* What do we do at each clock tick?
*/
void Clock_driver_support_at_tick_tsc(void)
{
pc586_tsc_at_tick = rdtsc();
}
void Clock_driver_support_at_tick_empty(void)
{
}
#define Clock_driver_support_at_tick()
#define Clock_driver_support_install_isr( _new, _old ) \
do { \
@@ -79,41 +44,8 @@ void Clock_driver_support_at_tick_empty(void)
extern volatile uint32_t Clock_driver_isrs;
uint32_t bsp_clock_nanoseconds_since_last_tick_tsc(void)
uint32_t bsp_clock_nanoseconds_since_last_tick(void)
{
/******
* Get nanoseconds using Pentium-compatible TSC register
******/
uint64_t diff_nsec;
diff_nsec = rdtsc() - pc586_tsc_at_tick;
/*
* At this point, with a hypothetical 10 GHz CPU clock and 100 Hz tick
* clock, diff_nsec <= 27 bits.
*/
diff_nsec *= pc586_nanoseconds_per_tick; /* <= 54 bits */
diff_nsec /= pc586_tsc_per_tick;
if (diff_nsec > pc586_nanoseconds_per_tick)
/*
* Hmmm... Some drift or rounding. Pin the value to 1 nanosecond before
* the next tick.
*/
/* diff_nsec = pc586_nanoseconds_per_tick - 1; */
diff_nsec = 12345;
return (uint32_t)diff_nsec;
}
uint32_t bsp_clock_nanoseconds_since_last_tick_i8254(void)
{
/******
* Get nanoseconds using 8254 timer chip
******/
uint32_t usecs, clicks, isrs;
uint32_t usecs1, usecs2;
uint8_t lsb, msb;
@@ -123,7 +55,9 @@ uint32_t bsp_clock_nanoseconds_since_last_tick_i8254(void)
* Fetch all the data in an interrupt critical section.
*/
rtems_interrupt_disable(level);
READ_8254(lsb, msb);
outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_LATCH);
inport_byte(TIMER_CNTR0, lsb);
inport_byte(TIMER_CNTR0, msb);
isrs = Clock_driver_isrs;
rtems_interrupt_enable(level);
@@ -151,58 +85,10 @@ uint32_t bsp_clock_nanoseconds_since_last_tick_i8254(void)
/* return it in nanoseconds */
return usecs * 1000;
}
/*
* Calibrate CPU cycles per tick. Interrupts should be disabled.
*/
static void calibrate_tsc(void)
{
uint64_t begin_time;
uint8_t then_lsb, then_msb, now_lsb, now_msb;
uint32_t i;
pc586_nanoseconds_per_tick =
rtems_configuration_get_microseconds_per_tick() * 1000;
/*
* We just reset the timer, so we know we're at the beginning of a tick.
*/
/*
* Count cycles. Watching the timer introduces a several microsecond
* uncertaintity, so let it cook for a while and divide by the number of
* ticks actually executed.
*/
begin_time = rdtsc();
for (i = rtems_clock_get_ticks_per_second() * pc386_isrs_per_tick;
i != 0; --i ) {
/* We know we've just completed a tick when timer goes from low to high */
then_lsb = then_msb = 0xff;
do {
READ_8254(now_lsb, now_msb);
if ((then_msb < now_msb) ||
((then_msb == now_msb) && (then_lsb < now_lsb)))
break;
then_lsb = now_lsb;
then_msb = now_msb;
} while (1);
}
pc586_tsc_per_tick = rdtsc() - begin_time;
/* Initialize "previous tick" counters */
pc586_tsc_at_tick = rdtsc();
#if 0
printk( "CPU clock at %u MHz\n", (uint32_t)(pc586_tsc_per_tick / 1000000));
#endif
pc586_tsc_per_tick /= rtems_clock_get_ticks_per_second();
}
#define Clock_driver_nanoseconds_since_last_tick \
bsp_clock_nanoseconds_since_last_tick
static void clockOn(
const rtems_irq_connect_data* unused
@@ -228,13 +114,6 @@ static void clockOn(
outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN);
outport_byte(TIMER_CNTR0, pc386_clock_click_count >> 0 & 0xff);
outport_byte(TIMER_CNTR0, pc386_clock_click_count >> 8 & 0xff);
/*
* Now calibrate cycles per tick. Do this every time we
* turn the clock on in case the CPU clock speed has changed.
*/
if ( x86_has_tsc() )
calibrate_tsc();
}
void clockOff(const rtems_irq_connect_data* unused)
@@ -263,42 +142,13 @@ static rtems_irq_connect_data clockIrqData = {
clockIsOn
};
void Clock_driver_support_initialize_hardware(void)
{
bool use_tsc = false;
bool use_8254 = false;
#if (CLOCK_DRIVER_USE_TSC == 1)
use_tsc = true;
#endif
#if (CLOCK_DRIVER_USE_8254 == 1)
use_8254 = true;
#endif
if ( !use_tsc && !use_8254 ) {
if ( x86_has_tsc() ) use_tsc = true;
else use_8254 = true;
}
if ( use_8254 ) {
/* printk( "Use 8254\n" ); */
Clock_driver_support_at_tick = Clock_driver_support_at_tick_empty;
Clock_driver_nanoseconds_since_last_tick =
bsp_clock_nanoseconds_since_last_tick_tsc;
} else {
/* printk( "Use TSC\n" ); */
Clock_driver_support_at_tick = Clock_driver_support_at_tick_tsc;
Clock_driver_nanoseconds_since_last_tick =
bsp_clock_nanoseconds_since_last_tick_i8254;
}
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
printk("Unable to initialize system clock\n");
rtems_fatal_error_occurred(1);
}
}
#define Clock_driver_support_initialize_hardware() \
do { \
if (!BSP_install_rtems_irq_handler (&clockIrqData)) { \
printk("Unable to initialize system clock\n"); \
rtems_fatal_error_occurred(1); \
} \
} while (0)
#define Clock_driver_support_shutdown_hardware() \
do { \

View File

@@ -46,41 +46,6 @@ RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET],
before rebooting the PC. This is useful for unattended PC deployments
])
RTEMS_BSPOPTS_SET([CLOCK_DRIVER_USE_TSC],[*],[0])
RTEMS_BSPOPTS_HELP([CLOCK_DRIVER_USE_TSC],
[If enabled, the clock driver will use the TSC register available
with Pentium-class CPUs to report close to nanosecond-accuracy
clock times.
Enable it, if:
- you have nanosecond timing enabled (you do NOT have
USE_TICKS_FOR_CPU_USAGE_STATISTICS enabled)
- you do NOT have CLOCK_DRIVER_USE_8254 enabled (use one, the other,
or neither)
- you have a Pentium which supports TSC (all Intels, and probably
all or most clones)
- you do not have a variable-speed CPU clock. Note that some
motherboard BIOS will automatically vary clock speed for thermal
control. Note also, however, that really new Pentium-class chips
from Intel and AMD will maintain a constant-rate TSC regardless.
])
RTEMS_BSPOPTS_SET([CLOCK_DRIVER_USE_8254],[*],[0])
RTEMS_BSPOPTS_HELP([CLOCK_DRIVER_USE_8254],
[If enabled, the clock driver will use the good old 8254 chip
to report microsecond-accuracy clock times.
Enable it, if:
- you have nanosecond timing enabled (you do NOT have
USE_TICKS_FOR_CPU_USAGE_STATISTICS enabled)
- you do NOT have CLOCK_DRIVER_USE_TSC enabled (use one, the other,
or neither)
- you do not mind adding roughly 5 microseconds to each context switch.
])
if test X${CLOCK_DRIVER_USE_TSC} = X1 -a X${CLOCK_DRIVER_USE_8254} = X1 ; then
AC_MSG_ERROR([pc386 both TSC and 8254 specified for clock driver])
fi
#define CLOCK_DRIVER_USE_8254 $CLOCK_DRIVER_USE_8254
## if this is an i386, does gas have good code16 support?
RTEMS_I386_GAS_CODE16
AM_CONDITIONAL(RTEMS_GAS_CODE16,[test "$RTEMS_GAS_CODE16" = "yes"])

View File

@@ -273,20 +273,6 @@ static int console_last_close(int major, int minor, void *arg)
return 0;
}
static int ser_console_first_open(int major, int minor, void *arg)
{
/*
* Pass data area info down to driver
*/
BSP_uart_termios_set(BSPConsolePort,
((rtems_libio_open_close_args_t *)arg)->iop->data1);
/* Enable interrupts on channel */
BSP_uart_intr_ctrl(BSPConsolePort, BSP_UART_INTR_CTRL_TERMIOS);
return 0;
}
/*-------------------------------------------------------------------------+
| Console device driver OPEN entry point
+--------------------------------------------------------------------------*/
@@ -334,8 +320,6 @@ console_open(rtems_device_major_number major,
cb.write = BSP_uart_termios_write_com2;
}
cb.firstOpen = ser_console_first_open;
status = rtems_termios_open (major, minor, arg, &cb);
if(status != RTEMS_SUCCESSFUL)
@@ -344,6 +328,15 @@ console_open(rtems_device_major_number major,
return status;
}
/*
* Pass data area info down to driver
*/
BSP_uart_termios_set(BSPConsolePort,
((rtems_libio_open_close_args_t *)arg)->iop->data1);
/* Enable interrupts on channel */
BSP_uart_intr_ctrl(BSPConsolePort, BSP_UART_INTR_CTRL_TERMIOS);
return RTEMS_SUCCESSFUL;
}

View File

@@ -42,7 +42,6 @@
#include <bsp.h>
#include <bsp/irq.h>
#include <libcpu/cpuModel.h>
/*-------------------------------------------------------------------------+
| Constants
@@ -60,18 +59,18 @@
| Global Variables
+--------------------------------------------------------------------------*/
volatile uint32_t Ttimer_val;
bool benchmark_timer_find_average_overhead = true;
bool benchmark_timer_find_average_overhead = true;
volatile unsigned int fastLoop1ms, slowLoop1ms;
void (*benchmark_timer_initialize_function)(void) = 0;
void (*benchmark_timer_initialize_function)(void) = 0;
uint32_t (*benchmark_timer_read_function)(void) = 0;
void (*Timer_exit_function)(void) = 0;
void (*Timer_exit_function)(void) = 0;
/*-------------------------------------------------------------------------+
| External Prototypes
+--------------------------------------------------------------------------*/
extern void timerisr(void);
/* timer (int 08h) Interrupt Service Routine (defined in 'timerisr.s') */
extern int x86_capability;
/*
* forward declarations
@@ -83,6 +82,22 @@ void Timer_exit(void);
| Pentium optimized timer handling.
+--------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------+
| Function: rdtsc
| Description: Read the value of PENTIUM on-chip cycle counter.
| Global Variables: None.
| Arguments: None.
| Returns: Value of PENTIUM on-chip cycle counter.
+--------------------------------------------------------------------------*/
static inline unsigned long long
rdtsc(void)
{
/* Return the value of the on-chip cycle counter. */
unsigned long long result;
asm volatile(".byte 0x0F, 0x31" : "=A" (result));
return result;
} /* rdtsc */
/*-------------------------------------------------------------------------+
| Function: Timer_exit
| Description: Timer cleanup routine at RTEMS exit. NOTE: This routine is
@@ -273,7 +288,7 @@ benchmark_timer_initialize(void)
static bool First = true;
if (First) {
if (x86_has_tsc()) {
if (x86_capability & (1 << 4) ) {
#if defined(DEBUG)
printk("TSC: timer initialization\n");
#endif /* DEBUG */

View File

@@ -1,11 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/ckinit.c: The Shared Memory Driver no longer requires the

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _init_i386ex}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _init_i386ex}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}

View File

@@ -1,4 +1,18 @@
/*
/* Timer_init()
*
* This routine initializes the timer on the FORCE CPU-386 board.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: This routine will not work if the optimizer is enabled
* for some compilers. The multiple writes to the Z8036
* may be optimized away.
*
* It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*

View File

@@ -1,7 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-05 Ralf Corsépius <ralf.corsepius@rtems.org>
* timer/timer.c: Convert to "bool".

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}

View File

@@ -1,11 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove noinst_PROGRAMS (Unused).
2008-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* startup/init5272.c: Add missing prototypes.

View File

@@ -14,6 +14,7 @@ include_HEADERS += include/tm27.h
nodist_include_HEADERS = include/bspopts.h
DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS =
include_HEADERS += include/coverhd.h

View File

@@ -11,10 +11,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s }}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N} \
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start} \
%{qclock=*: -defsym _SYS_CLOCK_FREQUENCY=%*}
*endfile:

View File

@@ -1,11 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/ckinit.c: The Shared Memory Driver no longer requires the

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}

View File

@@ -1,4 +1,14 @@
/*
/* Timer_init()
*
* This routine initializes TIMER 2 for an MC68302.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*

View File

@@ -1,15 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* start/startfor340only.S: Remove (unused).
2008-09-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/ckinit.c: The Shared Memory Driver no longer requires the

View File

@@ -23,7 +23,7 @@ include_HEADERS += include/m68340.h
include_HEADERS += include/m68340.inc
include_HEADERS += include/m68349.inc
EXTRA_DIST = start/start.S
EXTRA_DIST = start/start.S start/startfor340only.S
start.$(OBJEXT): start/start.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = start.$(OBJEXT)

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}

View File

@@ -0,0 +1,489 @@
/*
* This file contains the entry point for the application.
* The name of this entry point is compiler dependent.
* It jumps to the BSP which is responsible for performing
* all initialization.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* Based on the `gen68360' board support package, and covered by the
* original distribution terms.
*
* Geoffroy Montel
* France Telecom - CNET/DSM/TAM/CAT
* 4, rue du Clos Courtel
* 35512 CESSON-SEVIGNE
* FRANCE
*
* e-mail: g_montel@yahoo.com
*
* $Id$
*/
#include <rtems/asm.h>
#include <m68340.inc>
BEGIN_CODE
/*
* Step 1: Decide on Reset Stack Pointer and Initial Program Counter
*/
Entry:
.long SYM(m340)+1024 | 0: Initial SSP
.long start | 1: Initial PC
.long SYM(_uhoh) | 2: Bus error
.long SYM(_uhoh) | 3: Address error
.long SYM(_uhoh) | 4: Illegal instruction
.long SYM(_uhoh) | 5: Zero division
.long SYM(_uhoh) | 6: CHK, CHK2 instruction
.long SYM(_uhoh) | 7: TRAPcc, TRAPV instructions
.long SYM(_uhoh) | 8: Privilege violation
.long SYM(_uhoh) | 9: Trace
.long SYM(_uhoh) | 10: Line 1010 emulator
.long SYM(_uhoh) | 11: Line 1111 emulator
.long SYM(_uhoh) | 12: Hardware breakpoint
.long SYM(_uhoh) | 13: Reserved for coprocessor violation
.long SYM(_uhoh) | 14: Format error
.long SYM(_uhoh) | 15: Uninitialized interrupt
.long SYM(_uhoh) | 16: Unassigned, reserved
.long SYM(_uhoh) | 17:
.long SYM(_uhoh) | 18:
.long SYM(_uhoh) | 19:
.long SYM(_uhoh) | 20:
.long SYM(_uhoh) | 21:
.long SYM(_uhoh) | 22:
.long SYM(_uhoh) | 23:
.long SYM(_spuriousInterrupt) | 24: Spurious interrupt
.long SYM(_uhoh) | 25: Level 1 interrupt autovector
.long SYM(_uhoh) | 26: Level 2 interrupt autovector
.long SYM(_uhoh) | 27: Level 3 interrupt autovector
.long SYM(_uhoh) | 28: Level 4 interrupt autovector
.long SYM(_uhoh) | 29: Level 5 interrupt autovector
.long SYM(_uhoh) | 30: Level 6 interrupt autovector
.long SYM(_uhoh) | 31: Level 7 interrupt autovector
.long SYM(_uhoh) | 32: Trap instruction (0-15)
.long SYM(_uhoh) | 33:
.long SYM(_uhoh) | 34:
.long SYM(_uhoh) | 35:
.long SYM(_uhoh) | 36:
.long SYM(_uhoh) | 37:
.long SYM(_uhoh) | 38:
.long SYM(_uhoh) | 39:
.long SYM(_uhoh) | 40:
.long SYM(_uhoh) | 41:
.long SYM(_uhoh) | 42:
.long SYM(_uhoh) | 43:
.long SYM(_uhoh) | 44:
.long SYM(_uhoh) | 45:
.long SYM(_uhoh) | 46:
.long SYM(_uhoh) | 47:
.long SYM(_uhoh) | 48: Reserved for coprocessor
.long SYM(_uhoh) | 49:
.long SYM(_uhoh) | 50:
.long SYM(_uhoh) | 51:
.long SYM(_uhoh) | 52:
.long SYM(_uhoh) | 53:
.long SYM(_uhoh) | 54:
.long SYM(_uhoh) | 55:
.long SYM(_uhoh) | 56:
.long SYM(_uhoh) | 57:
.long SYM(_uhoh) | 58:
.long SYM(_uhoh) | 59: Unassigned, reserved
.long SYM(_uhoh) | 60:
.long SYM(_uhoh) | 61:
.long SYM(_uhoh) | 62:
.long SYM(_uhoh) | 63:
.long SYM(_uhoh) | 64: User defined vectors (192)
.long SYM(_uhoh) | 65:
.long SYM(_uhoh) | 66:
.long SYM(_uhoh) | 67:
.long SYM(_uhoh) | 68:
.long SYM(_uhoh) | 69:
.long SYM(_uhoh) | 70:
.long SYM(_uhoh) | 71:
.long SYM(_uhoh) | 72:
.long SYM(_uhoh) | 73:
.long SYM(_uhoh) | 74:
.long SYM(_uhoh) | 75:
.long SYM(_uhoh) | 76:
.long SYM(_uhoh) | 77:
.long SYM(_uhoh) | 78:
.long SYM(_uhoh) | 79:
.long SYM(_uhoh) | 80:
.long SYM(_uhoh) | 81:
.long SYM(_uhoh) | 82:
.long SYM(_uhoh) | 83:
.long SYM(_uhoh) | 84:
.long SYM(_uhoh) | 85:
.long SYM(_uhoh) | 86:
.long SYM(_uhoh) | 87:
.long SYM(_uhoh) | 88:
.long SYM(_uhoh) | 89:
.long SYM(_uhoh) | 90:
.long SYM(_uhoh) | 91:
.long SYM(_uhoh) | 92:
.long SYM(_uhoh) | 93:
.long SYM(_uhoh) | 94:
.long SYM(_uhoh) | 95:
.long SYM(_uhoh) | 96:
.long SYM(_uhoh) | 97:
.long SYM(_uhoh) | 98:
.long SYM(_uhoh) | 99:
.long SYM(_uhoh) | 100:
.long SYM(_uhoh) | 101:
.long SYM(_uhoh) | 102:
.long SYM(_uhoh) | 103:
.long SYM(_uhoh) | 104:
.long SYM(_uhoh) | 105:
.long SYM(_uhoh) | 106:
.long SYM(_uhoh) | 107:
.long SYM(_uhoh) | 108:
.long SYM(_uhoh) | 109:
.long SYM(_uhoh) | 110:
.long SYM(_uhoh) | 111:
.long SYM(_uhoh) | 112:
.long SYM(_uhoh) | 113:
.long SYM(_uhoh) | 114:
.long SYM(_uhoh) | 115:
.long SYM(_uhoh) | 116:
.long SYM(_uhoh) | 117:
.long SYM(_uhoh) | 118:
.long SYM(_uhoh) | 119:
.long SYM(_uhoh) | 120:
.long SYM(_uhoh) | 121:
.long SYM(_uhoh) | 122:
.long SYM(_uhoh) | 123:
.long SYM(_uhoh) | 124:
.long SYM(_uhoh) | 125:
.long SYM(_uhoh) | 126:
.long SYM(_uhoh) | 127:
.long SYM(_uhoh) | 128:
.long SYM(_uhoh) | 129:
.long SYM(_uhoh) | 130:
.long SYM(_uhoh) | 131:
.long SYM(_uhoh) | 132:
.long SYM(_uhoh) | 133:
.long SYM(_uhoh) | 134:
.long SYM(_uhoh) | 135:
.long SYM(_uhoh) | 136:
.long SYM(_uhoh) | 137:
.long SYM(_uhoh) | 138:
.long SYM(_uhoh) | 139:
.long SYM(_uhoh) | 140:
.long SYM(_uhoh) | 141:
.long SYM(_uhoh) | 142:
.long SYM(_uhoh) | 143:
.long SYM(_uhoh) | 144:
.long SYM(_uhoh) | 145:
.long SYM(_uhoh) | 146:
.long SYM(_uhoh) | 147:
.long SYM(_uhoh) | 148:
.long SYM(_uhoh) | 149:
.long SYM(_uhoh) | 150:
.long SYM(_uhoh) | 151:
.long SYM(_uhoh) | 152:
.long SYM(_uhoh) | 153:
.long SYM(_uhoh) | 154:
.long SYM(_uhoh) | 155:
.long SYM(_uhoh) | 156:
.long SYM(_uhoh) | 157:
.long SYM(_uhoh) | 158:
.long SYM(_uhoh) | 159:
.long SYM(_uhoh) | 160:
.long SYM(_uhoh) | 161:
.long SYM(_uhoh) | 162:
.long SYM(_uhoh) | 163:
.long SYM(_uhoh) | 164:
.long SYM(_uhoh) | 165:
.long SYM(_uhoh) | 166:
.long SYM(_uhoh) | 167:
.long SYM(_uhoh) | 168:
.long SYM(_uhoh) | 169:
.long SYM(_uhoh) | 170:
.long SYM(_uhoh) | 171:
.long SYM(_uhoh) | 172:
.long SYM(_uhoh) | 173:
.long SYM(_uhoh) | 174:
.long SYM(_uhoh) | 175:
.long SYM(_uhoh) | 176:
.long SYM(_uhoh) | 177:
.long SYM(_uhoh) | 178:
.long SYM(_uhoh) | 179:
.long SYM(_uhoh) | 180:
.long SYM(_uhoh) | 181:
.long SYM(_uhoh) | 182:
.long SYM(_uhoh) | 183:
.long SYM(_uhoh) | 184:
.long SYM(_uhoh) | 185:
.long SYM(_uhoh) | 186:
.long SYM(_uhoh) | 187:
.long SYM(_uhoh) | 188:
.long SYM(_uhoh) | 189:
.long SYM(_uhoh) | 190:
.long SYM(_uhoh) | 191:
.long SYM(_uhoh) | 192:
.long SYM(_uhoh) | 193:
.long SYM(_uhoh) | 194:
.long SYM(_uhoh) | 195:
.long SYM(_uhoh) | 196:
.long SYM(_uhoh) | 197:
.long SYM(_uhoh) | 198:
.long SYM(_uhoh) | 199:
.long SYM(_uhoh) | 200:
.long SYM(_uhoh) | 201:
.long SYM(_uhoh) | 202:
.long SYM(_uhoh) | 203:
.long SYM(_uhoh) | 204:
.long SYM(_uhoh) | 205:
.long SYM(_uhoh) | 206:
.long SYM(_uhoh) | 207:
.long SYM(_uhoh) | 208:
.long SYM(_uhoh) | 209:
.long SYM(_uhoh) | 210:
.long SYM(_uhoh) | 211:
.long SYM(_uhoh) | 212:
.long SYM(_uhoh) | 213:
.long SYM(_uhoh) | 214:
.long SYM(_uhoh) | 215:
.long SYM(_uhoh) | 216:
.long SYM(_uhoh) | 217:
.long SYM(_uhoh) | 218:
.long SYM(_uhoh) | 219:
.long SYM(_uhoh) | 220:
.long SYM(_uhoh) | 221:
.long SYM(_uhoh) | 222:
.long SYM(_uhoh) | 223:
.long SYM(_uhoh) | 224:
.long SYM(_uhoh) | 225:
.long SYM(_uhoh) | 226:
.long SYM(_uhoh) | 227:
.long SYM(_uhoh) | 228:
.long SYM(_uhoh) | 229:
.long SYM(_uhoh) | 230:
.long SYM(_uhoh) | 231:
.long SYM(_uhoh) | 232:
.long SYM(_uhoh) | 233:
.long SYM(_uhoh) | 234:
.long SYM(_uhoh) | 235:
.long SYM(_uhoh) | 236:
.long SYM(_uhoh) | 237:
.long SYM(_uhoh) | 238:
.long SYM(_uhoh) | 239:
.long SYM(_uhoh) | 240:
.long SYM(_uhoh) | 241:
.long SYM(_uhoh) | 242:
.long SYM(_uhoh) | 243:
.long SYM(_uhoh) | 244:
.long SYM(_uhoh) | 245:
.long SYM(_uhoh) | 246:
.long SYM(_uhoh) | 247:
.long SYM(_uhoh) | 248:
.long SYM(_uhoh) | 249:
.long SYM(_uhoh) | 250:
.long SYM(_uhoh) | 251:
.long SYM(_uhoh) | 252:
.long SYM(_uhoh) | 253:
.long SYM(_uhoh) | 254:
.long SYM(_uhoh) | 255:
/*
* Default trap handler
* With an oscilloscope you can see AS* stop
*/
PUBLIC (_uhoh)
SYM(_uhoh): nop | Leave spot for breakpoint
stop #0x2700 | Stop with interrupts disabled
bra.s SYM(_uhoh) | Stuck forever
/*
* Log, but otherwise ignore, spurious interrupts
*/
PUBLIC (_spuriousInterrupt)
SYM(_spuriousInterrupt):
addql #1,SYM(_M68kSpuriousInterruptCount)
rte
/*
* Place the low-order 3 octets of the board's ethernet address at
* a `well-known' fixed location relative to the startup location.
*/
.align 2
.word 0 | Padding
ethernet_address_buffer:
.word 0x08F3 | Default address
.word 0xDEAD
.word 0xCAFE
/* -- equates -- */
.equ _PROM_Start, 0x01000000 /* CS0 */
.equ _BCCram_Start, 0x00000000 /* CS1 */
.equ _FLEX_Start, 0x08000000 /* CS2 */
.equ _I2C_Start, 0x02000000 /* CS3 */
.equ _EXTram_Start, 0x10000000 /* CS4 */
.equ _EXTram_Size, 0x000400000 /* 4 Mbytes */
.equ _SPEED, 0xD780 /* 25 Mhz CPU349 */
/* .equ _SPEED, 0xD700 25 Mhz */
/* .equ _SPEED, 0xCE00 16 Mhz */
BEGIN_DATA
_crt0_init_stack:
ds.l 0x1000
_crt0_init_stktop:
BEGIN_CODE
dc.l _crt0_init_stktop /* reset SP */
dc.l _crt0_cold_start /* reset PC */
dc.l _crt0_warm_start
.ascii "RTEMS"
dc.w 0
.align 2
_table_cs:
/* carte Astecc - 68340 */
dc.l 0x003FFFF0 /* Mask CS0 (4Mbytes PROM, 32bits, 0WS) */
/* dc.l 0x003FFFFD Mask CS0 (4Mbytes PROM, 16bits, 3WS) */
dc.l ((_PROM_Start&0xFFFFFF00)+0x00000003) /* Base CS0 */
/* dc.l 0x0000FFF1 MASK CS1 (RAMBCC340, 0WS, FTE) */
dc.l 0x0000FFFD /* MASK CS1 (RAMBCC340, 0WS, FTE) */
/* dc.l ((_BCCram_Start&0xFFFFFF00)+0x00000007) Base CS1 */
dc.l ((_BCCram_Start&0xFFFFFF00)+0x00000003) /* Base CS1 */
dc.l 0x000000FF /* MASK CS2 (FLEX, ext DTACK, 256 bytes) */
dc.l ((_FLEX_Start&0xFFFFFF00)+0x00000003) /* Base CS2 */
dc.l 0x000000FF /* Mask CS3 (I2C, ext DTACK, 256 bytes) */
dc.l ((_I2C_Start&0xFFFFFF00)+0x00000003) /* Base CS3 */
/*
* Initial PC
*/
.globl start
start:
_crt0_cold_start:
moveq.l #0,d0 /* signal cold reset */
bra.s _crt0_common_start
_crt0_warm_start:
moveq.l #1,d0 /* signal warm reset */
_crt0_common_start:
move.w #0x2700,sr /* disable interrupts and switch to interrupt mode */
movea.l #_crt0_init_stktop,sp /* set up initialization stack */
lea Entry,a0 /* Get base of vector table */
movec a0,vbr /* Set up the VBR */
moveq.l #0x07,d1
movec.l d1,dfc /* prepare access in CPU space */
move.l #(BASE_SIM+1),d1
moves.l d1,BASE_REG /* base initialization (must be MOVES, PCC-130795) */
moveq.l #0x05,d1
movec.l d1,dfc
movea.l #BASE_SIM,a0
/* -- disable Bus Monitor -- */
move.b #0,SIM_SYPCR(a0) /* system protection control register */
/* -- set frequency to 25.16 Mhz -- */
move.w #_SPEED,SIM_SYNCR(a0) /* clock */
sync_wait:
btst.b #3,(SIM_SYNCR+1)(a0)
beq sync_wait
/* -- enable A31-A24 -- */
clr.b SIM_PPRA1(a0)
/* -- show cycles, user acces to SIM, 4 /CS & 4 /IT -- */
move.w #0x427F,SIM_MCR(a0)
/* -- chip select initialization -- */
lea.l SIM_MASKH0(a0),a2
lea.l _table_cs(%pc),a1
moveq.l #0x07,d1
_b_cs:
move.l (a1)+, (a2)+
dbra d1,_b_cs
/* fill RAM if COLDSTART */
tst.l d0
bne _dont_fill
movea.l #_EXTram_Start,a0 /* get start */
move.l #_EXTram_Size,d1 /* get size */
lsr.l #2,d1 /* ajust for long word */
_fill_loop:
clr.l (a0)+
subq.l #1,d1
bne _fill_loop
_dont_fill:
jmp SYM(_Init68340) | Start C code (which never returns)
/*
* Copy DATA segment, clear BSS segment, set up real stack,
* initialize heap, start C program.
* Assume that DATA and BSS sizes are multiples of 4.
*/
PUBLIC (_CopyDataClearBSSAndStart)
SYM(_CopyDataClearBSSAndStart):
lea copy_start,a0 | Get start of DATA in RAM
lea SYM(etext),a2 | Get start of DATA in ROM
cmpl a0,a2 | Are they the same?
beq.s NOCOPY | Yes, no copy necessary
lea copy_end,a1 | Get end of DATA in RAM
bra.s COPYLOOPTEST | Branch into copy loop
COPYLOOP:
movel a2@+,a0@+ | Copy word from ROM to RAM
COPYLOOPTEST:
cmpl a1,a0 | Done?
bcs.s COPYLOOP | No, skip
NOCOPY:
lea clear_start,a0 | Get start of BSS
lea clear_end,a1 | Get end of BSS
clrl d0 | Value to set
bra.s ZEROLOOPTEST | Branch into clear loop
ZEROLOOP:
movel d0,a0@+ | Clear a word
ZEROLOOPTEST:
cmpl a1,a0 | Done?
bcs.s ZEROLOOP | No, skip
movel #stack_init,a7 | set master stack pointer
movel d0,a7@- | environp
movel d0,a7@- | argv
movel d0,a7@- | argc
jsr SYM(boot_card) | Call C main
PUBLIC (_mainDone)
SYM(_mainDone):
nop | Leave spot for breakpoint
movew #1,a7 | Force a double bus error
movel d0,a7@- | This should cause a RESET
stop #0x2700 | Stop with interrupts disabled
bra.s SYM(_mainDone) | Stuck forever
.align 2
BEGIN_DATA_DCL
.align 2
PUBLIC (environ)
SYM (environ):
.long 0
PUBLIC (_M68kSpuriousInterruptCount)
SYM (_M68kSpuriousInterruptCount):
.long 0
END_DATA_DCL
END

View File

@@ -1,4 +1,6 @@
/*
* Timer_init()
*
* ATTENTION: AS MC68349 has no built-in Timer, the following code doesn't work
* in a MC68349. You can't use FIFO full mode for the moment, but
* it should be easy to fix this by using an external timer

View File

@@ -1,16 +1,3 @@
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Backport from CVS-HEAD.
2008-10-21 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* spi/mc68360_spidrv.h:
removed orphaned file
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Eliminate uses of old benchmark timer names.
2008-09-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* spi/mc68360_spidrv.c: Convert to "bool".

View File

@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
*endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}

Some files were not shown because too many files have changed in this diff Show More