Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
0125f887
Commit
0125f887
authored
Apr 20, 2015
by
Julien
Browse files
Fix most of configuration file-related issues
for VxWorkd653
parent
55602b52
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-vxworks653_conf-connections.adb
View file @
0125f887
-- with Locations;
with
Ada
.
Strings
;
use
Ada
.
Strings
;
with
Ada
.
Strings
.
Fixed
;
use
Ada
.
Strings
.
Fixed
;
with
Ocarina
.
Backends
.
Utils
;
with
Ocarina
.
Namet
;
use
Ocarina
.
Namet
;
with
Ocarina
.
ME_AADL
;
...
...
@@ -28,6 +32,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Root_Node
:
Node_Id
:=
No_Node
;
Connections_Node
:
Node_Id
:=
No_Node
;
Channel_Identifier
:
Unsigned_Long_Long
:=
0
;
procedure
Visit_Architecture_Instance
(
E
:
Node_Id
);
procedure
Visit_Component_Instance
(
E
:
Node_Id
);
...
...
@@ -133,6 +138,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Push_Entity
(
P
);
Push_Entity
(
U
);
Channel_Identifier
:=
0
;
Current_XML_Node
:=
XTN
.
Root_Node
(
XTN
.
XML_File
(
U
));
Connections_Node
:=
Make_XML_Node
(
"Connections"
);
...
...
@@ -163,7 +170,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
procedure
Visit_Virtual_Processor_Instance
(
E
:
Node_Id
)
is
Corresponding_Process
:
Node_Id
;
C
o
nne
ction
_Node
:
Node_Id
;
C
ha
nne
l
_Node
:
Node_Id
;
Source_Node
:
Node_Id
;
Destination_Node
:
Node_Id
;
Feature
:
Node_Id
;
...
...
@@ -182,7 +189,12 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Port_Destination
:=
Item
(
First_Node
(
Destinations
(
Feature
)));
Partition_Destination
:=
Parent_Component
(
Port_Destination
);
Connection_Node
:=
Make_XML_Node
(
"Connection"
);
Channel_Node
:=
Make_XML_Node
(
"Channel"
);
Add_Attribute
(
"Id"
,
Trim
(
Unsigned_Long_Long
'
Image
(
Channel_Identifier
),
Left
),
Channel_Node
);
Source_Node
:=
Make_XML_Node
(
"Source"
);
Add_Attribute
(
"PartitionNameRef"
,
Get_Name_String
...
...
@@ -196,7 +208,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Source_Node
);
Append_Node_To_List
(
Source_Node
,
XTN
.
Subitems
(
C
o
nne
ction
_Node
));
XTN
.
Subitems
(
C
ha
nne
l
_Node
));
Destination_Node
:=
Make_XML_Node
(
"Destination"
);
Add_Attribute
(
"PortNameRef"
,
...
...
@@ -213,8 +225,8 @@ package body Ocarina.Backends.Vxworks653_Conf.Connections is
Destination_Node
);
Append_Node_To_List
(
Destination_Node
,
XTN
.
Subitems
(
C
o
nne
ction
_Node
));
Append_Node_To_List
(
C
o
nne
ction
_Node
,
XTN
.
Subitems
(
C
ha
nne
l
_Node
));
Append_Node_To_List
(
C
ha
nne
l
_Node
,
XTN
.
Subitems
(
Connections_Node
));
end
if
;
Feature
:=
Next_Node
(
Feature
);
...
...
src/backends/ocarina-backends-vxworks653_conf-hm.adb
View file @
0125f887
...
...
@@ -232,10 +232,11 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Error_Id_Level_Node
:=
Make_XML_Node
(
"ErrorIDLevel"
);
XTU
.
Add_Attribute
(
"ErrorIdentifier"
,
"HME_DEFAULT"
,
System_State
_Node
);
Error_Id_Level
_Node
);
XTU
.
Add_Attribute
(
"ErrorLevel"
,
"HM_PARTITION_LVL"
,
System_State_Node
);
Error_Id_Level_Node
);
Append_Node_To_List
(
Error_Id_Level_Node
,
XTN
.
Subitems
(
System_State_Node
));
...
...
@@ -249,10 +250,10 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Error_Id_Level_Node
:=
Make_XML_Node
(
"ErrorIDLevel"
);
XTU
.
Add_Attribute
(
"ErrorIdentifier"
,
"HME_DEFAULT"
,
System_State
_Node
);
Error_Id_Level
_Node
);
XTU
.
Add_Attribute
(
"ErrorLevel"
,
"HM_MODULE_LVL"
,
System_State
_Node
);
Error_Id_Level
_Node
);
Append_Node_To_List
(
Error_Id_Level_Node
,
XTN
.
Subitems
(
System_State_Node
));
...
...
@@ -265,9 +266,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
Error_Id_Level_Node
:=
Make_XML_Node
(
"ErrorIDLevel"
);
XTU
.
Add_Attribute
(
"ErrorIdentifier"
,
"HME_DEFAULT"
,
System_State
_Node
);
"HME_DEFAULT"
,
Error_Id_Level
_Node
);
XTU
.
Add_Attribute
(
"ErrorLevel"
,
"HM_PROCESS_LVL"
,
System_State
_Node
);
"HM_PROCESS_LVL"
,
Error_Id_Level
_Node
);
Append_Node_To_List
(
Error_Id_Level_Node
,
XTN
.
Subitems
(
System_State_Node
));
...
...
@@ -277,20 +278,6 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
XTU
.
Add_Attribute
(
"Name"
,
"moduleHm"
,
Module_HM_Table_Node
);
Append_Node_To_List
(
Module_HM_Table_Node
,
XTN
.
Subitems
(
HM_Node
));
Settings_Node
:=
Make_XML_Node
(
"Settings"
);
XTU
.
Add_Attribute
(
"maxQueueDepth"
,
"34"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"queueThreShold"
,
"32"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"stackSize"
,
"16384"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxLogEntries"
,
"100"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"logEntriesThreshold"
,
"98"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"attributeMask"
,
"0x00000001"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notificationHandler"
,
""
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notifMaxQueueDepth"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"eventFilterMask"
,
"0x00000000"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxErrorHandlerQueueDepth"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"errorHandlerQueueThreshold"
,
"0"
,
Settings_Node
);
Append_Node_To_List
(
Settings_Node
,
XTN
.
Subitems
(
Module_HM_Table_Node
));
System_State_Node
:=
Make_XML_Node
(
"SystemState"
);
Append_Node_To_List
(
System_State_Node
,
XTN
.
Subitems
(
Module_HM_Table_Node
));
...
...
@@ -347,6 +334,20 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
end
loop
;
end
if
;
Settings_Node
:=
Make_XML_Node
(
"Settings"
);
XTU
.
Add_Attribute
(
"maxQueueDepth"
,
"34"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"queueThreshold"
,
"32"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"stackSize"
,
"16384"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxLogEntries"
,
"100"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"logEntriesThreshold"
,
"98"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"attributeMask"
,
"0x00000001"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notificationHandler"
,
""
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notifMaxQueueDepth"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"eventFilterMask"
,
"0x00000000"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxErrorHandlerQueueDepth"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"errorHandlerQueueThreshold"
,
"0"
,
Settings_Node
);
Append_Node_To_List
(
Settings_Node
,
XTN
.
Subitems
(
Module_HM_Table_Node
));
Pop_Entity
;
Pop_Entity
;
end
Visit_Processor_Instance
;
...
...
@@ -387,30 +388,6 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
&
"_hm"
,
Partition_HM_Table_Node
);
Settings_Node
:=
Make_XML_Node
(
"Settings"
);
XTU
.
Add_Attribute
(
"maxQueueDepth"
,
"34"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"queueThreShold"
,
"32"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"stackSize"
,
"16384"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxLogEntries"
,
"100"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"logEntriesThreshold"
,
"98"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"attributeMask"
,
"0x00000001"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notificationHandler"
,
""
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notifMaxQueueDepth"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"eventFilterMask"
,
"0xFFFFFFFF"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxErrorHandlerQueueDepth"
,
"128"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"errorHandlerQueueThreshold"
,
"126"
,
Settings_Node
);
Append_Node_To_List
(
Settings_Node
,
XTN
.
Subitems
(
Partition_HM_Table_Node
));
Trusted_Partition_Node
:=
Make_XML_Node
(
"TrustedPartition"
);
XTU
.
Add_Attribute
(
"NameRef"
,
Get_Name_String
(
Map_Partition_Name
(
Virtual_Processor
)),
Trusted_Partition_Node
);
Append_Node_To_List
(
Trusted_Partition_Node
,
XTN
.
Subitems
(
Settings_Node
));
System_State_Node
:=
Make_XML_Node
(
"SystemState"
);
Append_Node_To_List
(
System_State_Node
,
XTN
.
Subitems
(
Partition_HM_Table_Node
));
...
...
@@ -451,6 +428,31 @@ package body Ocarina.Backends.Vxworks653_Conf.Hm is
"HME_HM_MSG"
,
"hmDH_EventLog"
);
Add_Error_Action
(
System_State_Node
,
"HME_DEFAULT"
,
"hmDefaultHandler"
);
Settings_Node
:=
Make_XML_Node
(
"Settings"
);
XTU
.
Add_Attribute
(
"maxQueueDepth"
,
"34"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"queueThreshold"
,
"32"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"stackSize"
,
"16384"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxLogEntries"
,
"100"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"logEntriesThreshold"
,
"98"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"attributeMask"
,
"0x00000001"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notificationHandler"
,
""
,
Settings_Node
);
XTU
.
Add_Attribute
(
"notifMaxQueueDepth"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"eventFilterMask"
,
"0xFFFFFFFF"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"maxErrorHandlerQueueDepth"
,
"128"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"errorHandlerQueueThreshold"
,
"126"
,
Settings_Node
);
Append_Node_To_List
(
Settings_Node
,
XTN
.
Subitems
(
Partition_HM_Table_Node
));
Trusted_Partition_Node
:=
Make_XML_Node
(
"TrustedPartition"
);
XTU
.
Add_Attribute
(
"NameRef"
,
Get_Name_String
(
Map_Partition_Name
(
Virtual_Processor
)),
Trusted_Partition_Node
);
Append_Node_To_List
(
Trusted_Partition_Node
,
XTN
.
Subitems
(
Settings_Node
));
return
Partition_HM_Table_Node
;
end
Generate_Partition_HM_Table
;
...
...
src/backends/ocarina-backends-vxworks653_conf-mapping.adb
View file @
0125f887
...
...
@@ -1117,6 +1117,25 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
Trim
(
Integer
'
Image
(
Partition_Identifier
),
Left
),
Partition_Node
);
-- Create the <Application/> sub-node.
Application_Node
:=
Make_XML_Node
(
"Application"
);
XTU
.
Add_Attribute
(
"NameRef"
,
Get_Name_String
(
Map_Partition_Name
(
Runtime
,
True
)),
Application_Node
);
Append_Node_To_List
(
Application_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
-- Create the <SharedLibraryRegion/> sub-node.
Shared_Library_Region_Node
:=
Make_XML_Node
(
"SharedLibraryRegion"
);
XTU
.
Add_Attribute
(
"NameRef"
,
"vxSysLib"
,
Shared_Library_Region_Node
);
Append_Node_To_List
(
Shared_Library_Region_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
-- Create the <Settings/> sub-node.
Settings_Node
:=
Make_XML_Node
(
"Settings"
);
Append_Node_To_List
(
Settings_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
...
...
@@ -1129,7 +1148,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
XTU
.
Add_Attribute
(
"numWorkerTasks"
,
"0"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"numStackGuardPages"
,
"0xffffffff"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"isrStackSize"
,
"0xffffffff"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"selS
c
rQSize"
,
"0xffffffff"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"selS
v
rQSize"
,
"0xffffffff"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"syscallPermissions"
,
"0xffffffff"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"numFiles"
,
"0xffffffff"
,
Settings_Node
);
XTU
.
Add_Attribute
(
"numDrivers"
,
"0xffffffff"
,
Settings_Node
);
...
...
@@ -1139,19 +1158,6 @@ package body Ocarina.Backends.Vxworks653_Conf.Mapping is
XTU
.
Add_Attribute
(
"maxEventQStallDuration"
,
"INFINITE_TIME"
,
Settings_Node
);
Shared_Library_Region_Node
:=
Make_XML_Node
(
"SharedLibraryRegion"
);
XTU
.
Add_Attribute
(
"NameRef"
,
"vxSysLib"
,
Shared_Library_Region_Node
);
Append_Node_To_List
(
Shared_Library_Region_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
Application_Node
:=
Make_XML_Node
(
"Application"
);
XTU
.
Add_Attribute
(
"NameRef"
,
Get_Name_String
(
Map_Partition_Name
(
Runtime
,
True
)),
Application_Node
);
Append_Node_To_List
(
Application_Node
,
XTN
.
Subitems
(
Partition_Description_Node
));
return
Partition_Node
;
end
Map_Partition
;
...
...
src/backends/ocarina-backends-vxworks653_conf-naming.adb
View file @
0125f887
...
...
@@ -257,7 +257,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Naming is
XTU
.
Add_Attribute
(
"MemorySizeText"
,
"0x10000"
,
Memory_Size_Node
);
XTU
.
Add_Attribute
(
"MemorySizeData"
,
"0x10000"
,
Memory_Size_Node
);
XTU
.
Add_Attribute
(
"MemorySizeRoData"
,
"0x10000"
,
Memory_Size_Node
);
XTU
.
Add_Attribute
(
"MemorySizePersistent"
,
"0x10000"
,
Memory_Size_Node
);
XTU
.
Add_Attribute
(
"MemorySizePersistentData"
,
"0x10000"
,
Memory_Size_Node
);
XTU
.
Add_Attribute
(
"MemorySizePersistentBss"
,
"0x10000"
,
Memory_Size_Node
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment