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
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
-- description of the system.
Current_XML_Node := Memory_Node;
if not AINU.Is_Empty (Subcomponents (E)) then
S := First_Node (Subcomponents (E));
while Present (S) loop
-- Visit the component instance corresponding to the
-- subcomponent S.
if AINU.Is_Processor (Corresponding_Instance (S)) then
if AINU.Is_Memory (Corresponding_Instance (S)) then
Visit (Corresponding_Instance (S));
end if;
S := Next_Node (S);
end loop;
end if;
-- Then, create the <MemoryLayout> section of the hardware
-- Then, create the <ProcessorTable> section of the hardware
-- 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
S := First_Node (Subcomponents (E));
while Present (S) loop
-- Visit the component instance corresponding to the
-- subcomponent S.
if AINU.Is_Memory (Corresponding_Instance (S)) then
if AINU.Is_Processor (Corresponding_Instance (S)) then
Visit (Corresponding_Instance (S));
end if;
S := Next_Node (S);
......@@ -291,7 +291,7 @@ package body Ocarina.Backends.Xtratum_Conf.Hardware_Description is
P := Make_Defining_Identifier (Name_Find);
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, ' '));
Append_Node_To_List
......
......@@ -210,7 +210,7 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is
Set_Str_To_Name_Buffer ("flags");
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);
Append_Node_To_List
(Make_Assignement (P, Q),
......@@ -309,11 +309,12 @@ package body Ocarina.Backends.Xtratum_Conf.Partition_Table is
Append_Node_To_List
(Make_Assignement (P, Q),
XTN.Items (Temporal_Req_Node));
Append_Node_To_List
(Temporal_Req_Node, XTN.Subitems (Partition_Node));
end if;
end;
Append_Node_To_List (Temporal_Req_Node, XTN.Subitems (Partition_Node));
-- Now, handle the ports of the partition.
if Has_Ports (E) then
......
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- 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
S : Node_Id;
Xm_Hypervisor_Node : Node_Id;
Memory_Area_Node : Node_Id;
Area_Node : Node_Id;
-- Associated_Memory : Node_Id;
P : Node_Id;
Q : Node_Id;
begin
......@@ -202,41 +200,22 @@ package body Ocarina.Backends.Xtratum_Conf.Xm_Hypervisor is
(Make_Assignement (P, Q),
XTN.Items (Xm_Hypervisor_Node));
-- Create the PhysicalMemoryAreas node associated
-- to the HMHypervisor node.
Memory_Area_Node := Make_XML_Node ("PhysicalMemoryAreas");
-- Create the PhysicalMemoryArea node associated
-- to the XMHypervisor node.
Memory_Area_Node := Make_XML_Node ("PhysicalMemoryArea");
Append_Node_To_List
(Memory_Area_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");
P := Make_Defining_Identifier (Name_Find);
Set_Str_To_Name_Buffer ("512KB");
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
(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