Commit 4fe6d76f authored by yoogx's avatar yoogx

* Add specific configurations for AIR IOP partitions

        For openaadl/ocarina#263
parent a7d2cdc8
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2018-2019 ESA & ISAE. --
-- Copyright (C) 2018-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -160,11 +160,13 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
P : Node_Id;
Q : Node_Id;
F : Node_Id;
Personnality : Supported_Execution_Platform;
begin
Associated_Processor := Get_Bound_Processor (E);
Associated_Memory := Get_Bound_Memory (E);
Associated_Module :=
Parent_Component (Parent_Subcomponent (Associated_Processor));
Personnality := Get_Execution_Platform (Associated_Processor);
-- Some checks on the model in order to make sure that
-- everything is correctly defined.
......@@ -368,8 +370,16 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
PartitionConfiguration := Make_XML_Node ("PartitionConfiguration");
XTU.Add_Attribute ("Personality", "RTEMS5",
PartitionConfiguration); -- XXX hardcoded
if Personnality = Platform_AIR then
XTU.Add_Attribute ("Personality", "RTEMS5",
PartitionConfiguration);
elsif Personnality = Platform_AIR_IOP then
XTU.Add_Attribute ("Personality", "Bare",
PartitionConfiguration);
else
raise Program_Error with "Unsupported platform " & Personnality'Img;
end if;
XTU.Add_Attribute ("Cores", "1",
PartitionConfiguration); -- XXX hardcoded
......@@ -381,10 +391,17 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
Libs_Node := Make_XML_Node ("Libs");
Append_Node_To_List (Libs_Node, XTN.Subitems (Partitionconfiguration));
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name ("LIBAIR; IMASPEX; LIBPRINTF")),
XTN.Subitems (Libs_Node));
if Personnality = Platform_AIR then
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name ("LIBAIR; IMASPEX; LIBPRINTF")),
XTN.Subitems (Libs_Node));
elsif Personnality = Platform_AIR_IOP then
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name ("LIBIOP")),
XTN.Subitems (Libs_Node));
end if;
-- Devices node, child of PartitionConfiguration
......@@ -423,12 +440,18 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
Permissions_Node := Make_XML_Node ("Permissions");
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name
("FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;"
& "SET_TOD; SET_PARTITION_MODE;")), -- XXX hardcoded
XTN.Subitems (Permissions_Node));
if Personnality = Platform_AIR then
Append_Node_To_List
(Make_Defining_Identifier
(Get_String_Name
("FPU_CONTROL; GLOBAL_TIME; CACHE_CONTROL;"
& "SET_TOD; SET_PARTITION_MODE;")), -- XXX hardcoded
XTN.Subitems (Permissions_Node));
elsif Personnality = Platform_AIR_IOP then
Append_Node_To_List
(Make_Defining_Identifier (Get_String_Name ("SUPERVISOR;")),
XTN.Subitems (Permissions_Node));
end if;
Append_Node_To_List (Permissions_Node,
XTN.Subitems (Partitionconfiguration));
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -331,6 +331,7 @@ package body Ocarina.Backends.Properties is
Platform_Vxworks_Name : Name_Id;
Platform_GNAT_Runtime_Name : Name_Id;
Platform_AIR_Name : Name_Id;
Platform_Air_IOP_Name : Name_Id;
Transport_BSD_Sockets_Name : Name_Id;
Transport_SpaceWire_Name : Name_Id;
......@@ -2502,6 +2503,8 @@ package body Ocarina.Backends.Properties is
return Platform_GNAT_Runtime;
elsif P_Name = Platform_AIR_Name then
return Platform_AIR;
elsif P_Name = Platform_AIR_IOP_Name then
return Platform_AIR_IOP;
else
return Platform_None;
end if;
......@@ -3066,6 +3069,7 @@ package body Ocarina.Backends.Properties is
Platform_Vxworks_Name := Get_String_Name ("vxworks");
Platform_GNAT_Runtime_Name := Get_String_Name ("gnat_runtime");
Platform_AIR_Name := Get_String_Name ("air");
Platform_AIR_IOP_Name := Get_String_Name ("air_iop");
Transport_BSD_Sockets_Name := Get_String_Name ("bsd_sockets");
Transport_SpaceWire_Name := Get_String_Name ("spacewire");
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2019 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2020 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -565,6 +565,7 @@ package Ocarina.Backends.Properties is
Platform_VxWorks,
Platform_GNAT_Runtime,
Platform_AIR,
Platform_AIR_IOP,
Platform_None); -- Unspecified
function Get_Execution_Platform
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment