Commit 6e5f95d1 authored by yoogx's avatar yoogx

* Fixes for XtratuM 4.2.1 XML Schema

parent 6ded79e0
...@@ -166,42 +166,42 @@ package body Ocarina.Backends.Xtratum_Conf.Hardware_Description is ...@@ -166,42 +166,42 @@ package body Ocarina.Backends.Xtratum_Conf.Hardware_Description is
Append_Node_To_List (Hw_Desc_Node, XTN.Subitems (Current_XML_Node)); Append_Node_To_List (Hw_Desc_Node, XTN.Subitems (Current_XML_Node));
Processor_Node := Make_XML_Node ("ProcessorTable"); -- First, create the <MemoryLayout> section of the hardware
-- description of the system.
Append_Node_To_List (Processor_Node, XTN.Subitems (Hw_Desc_Node)); Memory_Node := Make_XML_Node ("MemoryLayout");
Current_XML_Node := Processor_Node; Append_Node_To_List (Memory_Node, XTN.Subitems (Hw_Desc_Node));
-- First, create the <ProcessorTable> section of the hardware Current_XML_Node := Memory_Node;
-- description of the system.
if not AINU.Is_Empty (Subcomponents (E)) then if not AINU.Is_Empty (Subcomponents (E)) then
S := First_Node (Subcomponents (E)); S := First_Node (Subcomponents (E));
while Present (S) loop while Present (S) loop
-- Visit the component instance corresponding to the -- Visit the component instance corresponding to the
-- subcomponent S. -- subcomponent S.
if AINU.Is_Processor (Corresponding_Instance (S)) then if AINU.Is_Memory (Corresponding_Instance (S)) then
Visit (Corresponding_Instance (S)); Visit (Corresponding_Instance (S));
end if; end if;
S := Next_Node (S); S := Next_Node (S);
end loop; end loop;
end if; end if;
-- Then, create the <MemoryLayout> section of the hardware -- Then, create the <ProcessorTable> section of the hardware
-- description of the system. -- description of the system.
Memory_Node := Make_XML_Node ("MemoryLayout"); Processor_Node := Make_XML_Node ("ProcessorTable");
Append_Node_To_List (Memory_Node, XTN.Subitems (Hw_Desc_Node)); Append_Node_To_List (Processor_Node, XTN.Subitems (Hw_Desc_Node));
Current_XML_Node := Memory_Node; Current_XML_Node := Processor_Node;
if not AINU.Is_Empty (Subcomponents (E)) then if not AINU.Is_Empty (Subcomponents (E)) then
S := First_Node (Subcomponents (E)); S := First_Node (Subcomponents (E));
while Present (S) loop while Present (S) loop
-- Visit the component instance corresponding to the -- Visit the component instance corresponding to the
-- subcomponent S. -- subcomponent S.
if AINU.Is_Memory (Corresponding_Instance (S)) then if AINU.Is_Processor (Corresponding_Instance (S)) then
Visit (Corresponding_Instance (S)); Visit (Corresponding_Instance (S));
end if; end if;
S := Next_Node (S); S := Next_Node (S);
...@@ -291,7 +291,7 @@ package body Ocarina.Backends.Xtratum_Conf.Hardware_Description is ...@@ -291,7 +291,7 @@ package body Ocarina.Backends.Xtratum_Conf.Hardware_Description is
P := Make_Defining_Identifier (Name_Find); P := Make_Defining_Identifier (Name_Find);
Set_Str_To_Name_Buffer Set_Str_To_Name_Buffer
(Unsigned_Long_Long'Image (Frequency.S) & Frequency.F'Img); (Unsigned_Long_Long'Image (Frequency.S) & "MHz");
Q := Make_Defining_Identifier (Remove_Char (Name_Find, ' ')); Q := Make_Defining_Identifier (Remove_Char (Name_Find, ' '));
Append_Node_To_List Append_Node_To_List
......
...@@ -210,7 +210,7 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is ...@@ -210,7 +210,7 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is
Set_Str_To_Name_Buffer ("flags"); Set_Str_To_Name_Buffer ("flags");
P := Make_Defining_Identifier (Name_Find); P := Make_Defining_Identifier (Name_Find);
Set_Str_To_Name_Buffer ("system boot fp"); Set_Str_To_Name_Buffer ("system fp");
Q := Make_Defining_Identifier (Name_Find); Q := Make_Defining_Identifier (Name_Find);
Append_Node_To_List Append_Node_To_List
(Make_Assignement (P, Q), (Make_Assignement (P, Q),
...@@ -309,11 +309,12 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is ...@@ -309,11 +309,12 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is
Append_Node_To_List Append_Node_To_List
(Make_Assignement (P, Q), (Make_Assignement (P, Q),
XTN.Items (Temporal_Req_Node)); XTN.Items (Temporal_Req_Node));
Append_Node_To_List
(Temporal_Req_Node, XTN.Subitems (Partition_Node));
end if; end if;
end; end;
Append_Node_To_List (Temporal_Req_Node, XTN.Subitems (Partition_Node));
-- Now, handle the ports of the partition. -- Now, handle the ports of the partition.
if Has_Ports (E) then if Has_Ports (E) then
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2011-2015 ESA & ISAE. -- -- Copyright (C) 2011-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -174,8 +174,6 @@ package body Ocarina.Backends.Xtratum_Conf.Xm_Hypervisor is ...@@ -174,8 +174,6 @@ package body Ocarina.Backends.Xtratum_Conf.Xm_Hypervisor is
S : Node_Id; S : Node_Id;
Xm_Hypervisor_Node : Node_Id; Xm_Hypervisor_Node : Node_Id;
Memory_Area_Node : Node_Id; Memory_Area_Node : Node_Id;
Area_Node : Node_Id;
-- Associated_Memory : Node_Id;
P : Node_Id; P : Node_Id;
Q : Node_Id; Q : Node_Id;
begin begin
...@@ -202,41 +200,22 @@ package body Ocarina.Backends.Xtratum_Conf.Xm_Hypervisor is ...@@ -202,41 +200,22 @@ package body Ocarina.Backends.Xtratum_Conf.Xm_Hypervisor is
(Make_Assignement (P, Q), (Make_Assignement (P, Q),
XTN.Items (Xm_Hypervisor_Node)); XTN.Items (Xm_Hypervisor_Node));
-- Create the PhysicalMemoryAreas node associated -- Create the PhysicalMemoryArea node associated
-- to the HMHypervisor node. -- to the XMHypervisor node.
Memory_Area_Node := Make_XML_Node ("PhysicalMemoryAreas"); Memory_Area_Node := Make_XML_Node ("PhysicalMemoryArea");
Append_Node_To_List Append_Node_To_List
(Memory_Area_Node, (Memory_Area_Node,
XTN.Subitems (Xm_Hypervisor_Node)); XTN.Subitems (Xm_Hypervisor_Node));
-- Create the PhysicalMemoryArea node associated
-- to the PhysicalMemoryAreas node.
Area_Node := Make_XML_Node ("Area");
Set_Str_To_Name_Buffer ("start");
P := Make_Defining_Identifier (Name_Find);
Set_Str_To_Name_Buffer ("0x40000000");
Q := Make_Defining_Identifier (Name_Find);
-- Q := Make_Literal
-- (XV.New_Numeric_Value
--- (Get_Integer_Property
-- (Associated_Memory, "base_address"), 0, 10));
Append_Node_To_List (Make_Assignement (P, Q), XTN.Items (Area_Node));
Set_Str_To_Name_Buffer ("size"); Set_Str_To_Name_Buffer ("size");
P := Make_Defining_Identifier (Name_Find); P := Make_Defining_Identifier (Name_Find);
Set_Str_To_Name_Buffer ("512KB"); Set_Str_To_Name_Buffer ("512KB");
Q := Make_Defining_Identifier (Name_Find); Q := Make_Defining_Identifier (Name_Find);
-- Q := Make_Literal
-- (XV.New_Numeric_Value
-- (Get_Integer_Property
-- (Associated_Memory, "byte_count"), 0, 10));
Append_Node_To_List (Make_Assignement (P, Q), XTN.Items (Area_Node));
Append_Node_To_List (Area_Node, XTN.Subitems (Memory_Area_Node)); Append_Node_To_List
(Make_Assignement (P, Q),
XTN.Items (Memory_Area_Node));
Append_Node_To_List Append_Node_To_List
(Xm_Hypervisor_Node, (Xm_Hypervisor_Node,
......
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