-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 87a6817
Showing
480 changed files
with
41,195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.placeholder | ||
Ada/generated/config.def | ||
Ada/generated/*.ads | ||
Ada/generated/*.adb | ||
generated/*.h | ||
Ada/libgnat/gnat/s-imgint.adb | ||
Ada/libgnat/gnat/s-imgint.ads | ||
Ada/libgnat/gnat/s-imglli.adb | ||
Ada/libgnat/gnat/s-imglli.ads | ||
Ada/libgnat/gnat/s-imguns.ads | ||
Ada/libgnat/gnat/s-memmov.adb | ||
Ada/libgnat/gnat/s-memmov.ads | ||
Ada/libgnat/gnat/system.ads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
-- | ||
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> | ||
-- - Ryad Benadjila | ||
-- - Arnauld Michelizza | ||
-- - Mathieu Renard | ||
-- - Philippe Thierry | ||
-- - Philippe Trebuchet | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- | ||
|
||
with types.c; | ||
|
||
package c.kernel is | ||
|
||
procedure log (s : types.c.c_string) | ||
with | ||
convention => c, | ||
import => true, | ||
external_name => "dbg_log", | ||
global => null; | ||
|
||
procedure flush | ||
with | ||
convention => c, | ||
import => true, | ||
external_name => "dbg_flush", | ||
global => null; | ||
|
||
end c.kernel; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
-- | ||
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> | ||
-- - Ryad Benadjila | ||
-- - Arnauld Michelizza | ||
-- - Mathieu Renard | ||
-- - Philippe Thierry | ||
-- - Philippe Trebuchet | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- | ||
|
||
with ada.unchecked_conversion; | ||
with ewok.perm; | ||
with ewok.exported.dma; | ||
with types.c; | ||
|
||
package c.socinfo | ||
with spark_mode => off | ||
is | ||
|
||
type t_device_soc_infos is record | ||
name_ptr : system_address; | ||
base_addr : system_address; | ||
rcc_enr : system_address; | ||
rcc_enb : unsigned_32; | ||
size : unsigned_16; | ||
subregions : unsigned_8; | ||
intr_num : unsigned_8; | ||
ro : types.c.bool; | ||
minperm : ewok.perm.t_perm_name; | ||
end record; | ||
|
||
type t_device_soc_infos_access is access all t_device_soc_infos; | ||
|
||
function to_device_soc_infos is new ada.unchecked_conversion | ||
(system_address, t_device_soc_infos_access); | ||
|
||
function soc_devmap_find_device | ||
(addr : system_address; | ||
size : unsigned_16) | ||
return t_device_soc_infos_access | ||
with | ||
convention => c, | ||
import => true, | ||
external_name => "soc_devmap_find_device"; | ||
|
||
function soc_devmap_find_dma_device | ||
(dma_controller : ewok.exported.dma.t_controller; | ||
stream : ewok.exported.dma.t_stream) | ||
return t_device_soc_infos_access | ||
with | ||
convention => c, | ||
import => true, | ||
external_name => "soc_devices_get_dma"; | ||
|
||
procedure soc_devmap_enable_clock | ||
(socdev : t_device_soc_infos) | ||
with | ||
convention => c, | ||
import => true, | ||
external_name => "soc_devmap_enable_clock"; | ||
|
||
end c.socinfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
-- | ||
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> | ||
-- - Ryad Benadjila | ||
-- - Arnauld Michelizza | ||
-- - Mathieu Renard | ||
-- - Philippe Thierry | ||
-- - Philippe Trebuchet | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- | ||
|
||
|
||
pragma warnings (Off, "use clause for package"); | ||
|
||
with interfaces; use interfaces; | ||
pragma unreferenced (interfaces); | ||
|
||
with types; use types; | ||
pragma unreferenced (types); | ||
|
||
pragma warnings (On, "use clause for package"); | ||
|
||
package c is | ||
end c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
generated/config.def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
-- | ||
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> | ||
-- - Ryad Benadjila | ||
-- - Arnauld Michelizza | ||
-- - Mathieu Renard | ||
-- - Philippe Thierry | ||
-- - Philippe Trebuchet | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- | ||
|
||
|
||
with types.c; | ||
with c.kernel; | ||
|
||
package body debug | ||
with spark_mode => off | ||
is | ||
|
||
procedure log (s : string; nl : boolean := true) | ||
is | ||
c_string : types.c.c_string (1 .. s'length + 3); | ||
begin | ||
|
||
for i in s'range loop | ||
c_string(1 + i - s'first) := s(i); | ||
end loop; | ||
|
||
if nl then | ||
c_string(c_string'last - 2) := ASCII.CR; | ||
c_string(c_string'last - 1) := ASCII.LF; | ||
c_string(c_string'last) := ASCII.NUL; | ||
else | ||
c_string(c_string'last - 2) := ASCII.NUL; | ||
end if; | ||
|
||
c.kernel.log (c_string); | ||
c.kernel.flush; | ||
|
||
end log; | ||
|
||
|
||
procedure log (level : t_level; s : string) | ||
is | ||
begin | ||
case level is | ||
when DEBUG .. INFO => | ||
log (COLOR_KERNEL & s & COLOR_NORMAL); | ||
when WARNING .. ALERT => | ||
log (COLOR_ALERT & s & COLOR_NORMAL); | ||
end case; | ||
end log; | ||
|
||
|
||
procedure panic (s : string) | ||
is | ||
begin | ||
log (COLOR_ALERT & "panic: " & s & COLOR_NORMAL); | ||
loop null; end loop; | ||
end panic; | ||
|
||
end debug; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- | ||
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> | ||
-- - Ryad Benadjila | ||
-- - Arnauld Michelizza | ||
-- - Mathieu Renard | ||
-- - Philippe Thierry | ||
-- - Philippe Trebuchet | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- | ||
|
||
|
||
|
||
package debug | ||
with spark_mode => off | ||
is | ||
|
||
type t_level is (DEBUG, INFO, WARNING, ALERT); | ||
|
||
COLOR_NORMAL : constant string := ASCII.ESC & "[37;40m"; | ||
COLOR_ALERT : constant string := ASCII.ESC & "[37;41m"; | ||
COLOR_KERNEL : constant string := ASCII.ESC & "[37;44m"; | ||
|
||
procedure log (s : string; nl : boolean := true); | ||
procedure log (level : t_level; s : string); | ||
procedure panic (s : string); | ||
|
||
end debug; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-- | ||
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> | ||
-- - Ryad Benadjila | ||
-- - Arnauld Michelizza | ||
-- - Mathieu Renard | ||
-- - Philippe Thierry | ||
-- - Philippe Trebuchet | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- | ||
|
||
|
||
package body ewok.devices.interfaces | ||
with spark_mode => off | ||
is | ||
|
||
procedure init | ||
is begin | ||
ewok.devices.init; | ||
end init; | ||
|
||
end ewok.devices.interfaces; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- | ||
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> | ||
-- - Ryad Benadjila | ||
-- - Arnauld Michelizza | ||
-- - Mathieu Renard | ||
-- - Philippe Thierry | ||
-- - Philippe Trebuchet | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- | ||
|
||
|
||
package ewok.devices.interfaces | ||
with spark_mode => off | ||
is | ||
|
||
procedure init | ||
with | ||
convention => c, | ||
export => true, | ||
external_name => "dev_init"; | ||
|
||
end ewok.devices.interfaces; |
Oops, something went wrong.