Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Mock Turtle
Commits
601fc705
Commit
601fc705
authored
Oct 14, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/v4.0.2'
parents
4ae03dfa
0156922b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
135 additions
and
104 deletions
+135
-104
CHANGELOG
CHANGELOG
+0
-94
CHANGELOG.rst
CHANGELOG.rst
+109
-0
mockturtle-core.c
software/kernel/mockturtle-core.c
+8
-2
mockturtle-cpu.c
software/kernel/mockturtle-cpu.c
+1
-1
mockturtle-hmq.c
software/kernel/mockturtle-hmq.c
+7
-2
libmockturtle.c
software/lib/libmockturtle.c
+10
-5
No files found.
CHANGELOG
deleted
100644 → 0
View file @
4ae03dfa
# Change Log
## [4.0.1] - 2019-09-13
### Software
#### Fixed
- File Descriptor closed correctly so that the same process can do
``trtl_open()`` and ``trtl_close()`` multiple times
## [4.0.0] - 2019-05-14
### Documentation
#### Changed
- moved to sphinx and ReST
- merged HDL and software
- improved with examples
- doxygen and wbgen2 integration
#### Added
- Tools section
- Demo section
- Glossary section
### Gateware
#### Changed
- soft-CPU is now uRV
- each core has a set of dedicated HMQ and RMQ
#### Added
- uRV debug interface
- notification interrupts from firmwares
- new test benches
### Software
#### Changed
- synchronous messages redesigned
- HMQ API reflects gateware changes
- firmware library and framework improvements
- re-design Python wrapper a bit
#### Added
- driver auto-configuration from configuration ROM
- GDB agent to debug firmware
- tool to generated empty projects
- tools to interact with firmware framework
#### Removed
- Driver message filter
- LM32 support
- function to pause and start CPU execution
### Demo
#### Added
- new demo section
### Tests
#### Added
- new integration test section
## [3.1.0] - 2018-03-09
### Gateware
This release brings in the gateware from wr-node-core repository, such as it
is being used in the released and deployed v1.0 version of masterFIP.
The relevant commit is 96a7859 from git://ohwr.org/white-rabbit/wr-node-core.git.
This is a "known to work" version of the gateware, still using the "node core" name.
Following releases will switch to the "mock turtle" name.
## [3.0.0] - 2017-09-14
### Software
The realease of a new version has been necessary because I decided to remove
the debug interface from the API. This interface has been problematic, and
its original purpose has been neglected
#### Added
- standard TTY interface to access the soft-CPU serial console output
#### Removed
- debugfs interface to access the soft-CPU serial console output
- removed library functions to access the debugfs console output
- the ``mockturtle-messages`` tool is not able anymore to access the soft-CPU
serial console output
#### Fixed
- minor fixes
## [2.0] - 2016-06-08
### Software
#### Changed
- Project change name to Mock Turtle. this means renaming all files
functions, data structures, enumerates and variables to a new
convention
- port output real-time application to the real-time library
- improve kernel driver performance
#### Added
- unittest
## [1.1] - 2015-10-20
### Software
#### Changed
- minor changes in API behaviour on error
## [1.0] - 2015-09-17
### Software
- first release White Rabbit Node Core
[3.0.0] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-3.0.0
[2.0] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-2.0
[1.1] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-1.1
[1.0] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-1.0
CHANGELOG.rst
0 → 100644
View file @
601fc705
==========
Change Log
==========
[4.0.2] - 2019-10-14
====================
Changed
-------
- [sw] build driver on Linux v5.0 or greater
- [sw] driver sysfs files permission are g+w
Fixed
-----
- [sw] string overflow control
- [sw] ``trtl_msg_poll`` input validation
[4.0.1] - 2019-09-13
====================
Fixed
-----
- [sw] File Descriptor closed correctly so that the same process can do
``trtl_open()`` and ``trtl_close()`` multiple times
[4.0.0] - 2019-05-14
====================
Changed
-------
- [gw] soft-CPU is now uRV
- [gw] each core has a set of dedicated HMQ and RMQ
- [doc] moved to sphinx and ReST
- [doc] merged HDL and software
- [doc] improved with examples
- [doc] doxygen and wbgen2 integration
- [sw] synchronous messages redesigned
- [sw] HMQ API reflects gateware changes
- [sw] firmware library and framework improvements
- [sw] re-design Python wrapper a bit
Added
-----
- [gw] uRV debug interface
- [gw] notification interrupts from firmwares
- [gw] new test benches
- [doc] Tools section
- [doc] Demo section
- [doc] Glossary section
- [sw] driver auto-configuration from configuration ROM
- [sw] GDB agent to debug firmware
- [sw] tool to generated empty projects
- [sw] tools to interact with firmware framework
- [demo] new demo section
- [test] new integration test section
Removed
-------
- [sw] Driver message filter
- [sw] LM32 support
- [sw] function to pause and start CPU execution
[3.1.0] - 2018-03-09
====================
This release brings in the gateware from wr-node-core repository, such as it
is being used in the released and deployed v1.0 version of masterFIP.
The relevant commit is 96a7859 from git://ohwr.org/white-rabbit/wr-node-core.git.
This is a "known to work" version of the gateware, still using the "node core" name.
Following releases will switch to the "mock turtle" name.
[3.0.0] - 2017-09-14
====================
The realease of a new version has been necessary because I decided to remove
the debug interface from the API. This interface has been problematic, and
its original purpose has been neglected
Added
-----
- [sw] standard TTY interface to access the soft-CPU serial console output
Removed
-------
- [sw] debugfs interface to access the soft-CPU serial console output
- [sw] removed library functions to access the debugfs console output
- [sw] the ``mockturtle-messages`` tool is not able anymore to access the
soft-CPU serial console output
Fixed
-----
- [sw] minor fixes
[2.0.0] - 2016-06-08
====================
Changed
-------
- [sw] Project change name to Mock Turtle. this means renaming all files
[sw] functions, data structures, enumerates and variables to a new
convention
- [sw] port output real-time application to the real-time library
- [sw] improve kernel driver performance
Added
-----
- [test] unittest
[1.1.0] - 2015-10-20
====================
Changed
-------
- [sw] minor changes in API behaviour on error
[1.0.0] - 2015-09-17
====================
- [sw] first release White Rabbit Node Core
[3.0.0] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-3.0.0
[2.0] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-2.0
[1.1] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-1.1
[1.0] https://www.ohwr.org/projects/mock-turtle-sw/repository?rev=mock-turtle-1.0
software/kernel/mockturtle-core.c
View file @
601fc705
...
...
@@ -25,6 +25,9 @@
#include <linux/delay.h>
#include <linux/tty.h>
#include <linux/platform_device.h>
#include <linux/mod_devicetable.h>
#include <linux/uaccess.h>
#include <linux/version.h>
#include <mockturtle/hw/mockturtle_cpu_csr.h>
#include <mockturtle/hw/mockturtle_queue.h>
...
...
@@ -175,7 +178,7 @@ static ssize_t reset_mask_store(struct device *dev,
DEVICE_ATTR
(
application_id
,
0444
,
application_id_show
,
NULL
);
DEVICE_ATTR
(
n_cpu
,
0444
,
n_cpu_show
,
NULL
);
DEVICE_ATTR
(
reset_mask
,
06
4
4
,
reset_mask_show
,
reset_mask_store
);
DEVICE_ATTR
(
reset_mask
,
06
6
4
,
reset_mask_show
,
reset_mask_store
);
static
struct
attribute
*
trtl_dev_attr
[]
=
{
&
dev_attr_application_id
.
attr
,
...
...
@@ -253,11 +256,14 @@ static long trtl_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
if
(
_IOC_TYPE
(
cmd
)
!=
TRTL_IOCTL_MAGIC
)
return
-
ENOTTY
;
/* Validate user pointer */
#if KERNEL_VERSION(5, 0, 0) <= LINUX_VERSION_CODE
err
=
!
access_ok
(
uarg
,
_IOC_SIZE
(
cmd
));
#else
if
(
_IOC_DIR
(
cmd
)
&
_IOC_READ
)
err
=
!
access_ok
(
VERIFY_WRITE
,
uarg
,
_IOC_SIZE
(
cmd
));
if
(
_IOC_DIR
(
cmd
)
&
_IOC_WRITE
)
err
=
!
access_ok
(
VERIFY_READ
,
uarg
,
_IOC_SIZE
(
cmd
));
#endif
if
(
err
)
return
-
EFAULT
;
...
...
software/kernel/mockturtle-cpu.c
View file @
601fc705
...
...
@@ -138,7 +138,7 @@ static ssize_t reset_store(struct device *dev,
return
count
;
}
DEVICE_ATTR
(
reset
,
06
4
4
,
reset_show
,
reset_store
);
DEVICE_ATTR
(
reset
,
06
6
4
,
reset_show
,
reset_store
);
static
struct
attribute
*
trtl_cpu_attr
[]
=
{
&
dev_attr_reset
.
attr
,
...
...
software/kernel/mockturtle-hmq.c
View file @
601fc705
...
...
@@ -16,6 +16,8 @@
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/circ_buf.h>
#include <linux/uaccess.h>
#include <linux/version.h>
#include <mockturtle/hw/mockturtle_queue.h>
#include <mockturtle/hw/mockturtle_cpu_csr.h>
...
...
@@ -409,7 +411,7 @@ static ssize_t discard_all_store(struct device *dev,
return
count
;
}
DEVICE_ATTR
(
discard_all
,
02
0
0
,
NULL
,
discard_all_store
);
DEVICE_ATTR
(
discard_all
,
02
2
0
,
NULL
,
discard_all_store
);
/**
...
...
@@ -723,11 +725,14 @@ static long trtl_hmq_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
if
(
_IOC_TYPE
(
cmd
)
!=
TRTL_IOCTL_MAGIC
)
return
-
ENOTTY
;
/* Validate user pointer */
#if KERNEL_VERSION(5, 0, 0) <= LINUX_VERSION_CODE
err
=
!
access_ok
(
uarg
,
_IOC_SIZE
(
cmd
));
#else
if
(
_IOC_DIR
(
cmd
)
&
_IOC_READ
)
err
=
!
access_ok
(
VERIFY_WRITE
,
uarg
,
_IOC_SIZE
(
cmd
));
if
(
_IOC_DIR
(
cmd
)
&
_IOC_WRITE
)
err
=
!
access_ok
(
VERIFY_READ
,
uarg
,
_IOC_SIZE
(
cmd
));
#endif
if
(
err
)
return
-
EFAULT
;
...
...
software/lib/libmockturtle.c
View file @
601fc705
...
...
@@ -520,12 +520,12 @@ int trtl_cpu_load_application_raw(struct trtl_dev *trtl,
unsigned
int
offset
)
{
struct
trtl_desc
*
wdesc
=
(
struct
trtl_desc
*
)
trtl
;
char
path
[
TRTL_PATH_LEN
];
char
path
[
TRTL_PATH_LEN
+
TRTL_NAME_LEN
+
1
+
3
];
int
fd
;
ssize_t
ret
;
size_t
i
=
0
;
snprintf
(
path
,
TRTL_PATH_LEN
,
"%s/%s-%02u"
,
snprintf
(
path
,
sizeof
(
path
)
,
"%s/%s-%02u"
,
wdesc
->
path
,
wdesc
->
name
,
index
);
fd
=
open
(
path
,
O_WRONLY
);
if
(
fd
<
0
)
...
...
@@ -565,10 +565,10 @@ int trtl_cpu_dump_application_raw(struct trtl_dev *trtl,
unsigned
int
offset
)
{
struct
trtl_desc
*
wdesc
=
(
struct
trtl_desc
*
)
trtl
;
char
path
[
TRTL_PATH_LEN
];
char
path
[
TRTL_PATH_LEN
+
TRTL_NAME_LEN
+
1
+
3
];
int
fd
,
i
=
0
,
c
=
100
;
snprintf
(
path
,
TRTL_PATH_LEN
,
"%s/%s-%02u"
,
snprintf
(
path
,
sizeof
(
path
)
,
"%s/%s-%02u"
,
wdesc
->
path
,
wdesc
->
name
,
index
);
fd
=
open
(
path
,
O_RDONLY
);
if
(
fd
<
0
)
...
...
@@ -683,12 +683,13 @@ int trtl_cpu_dump_application_file(struct trtl_dev *trtl,
static
int
trtl_dev_open
(
struct
trtl_desc
*
wdesc
)
{
if
(
wdesc
->
fd_dev
<
0
)
{
char
path
[
64
];
char
path
[
TRTL_PATH_LEN
+
TRTL_NAME_LEN
+
1
];
snprintf
(
path
,
sizeof
(
path
),
"%s/%s"
,
wdesc
->
path
,
wdesc
->
name
);
wdesc
->
fd_dev
=
open
(
path
,
O_RDWR
);
if
(
wdesc
->
fd_dev
<
0
)
return
-
1
;
}
return
0
;
}
...
...
@@ -1072,6 +1073,10 @@ int trtl_msg_poll(struct polltrtl *trtlp,
struct
pollfd
*
p
;
int
i
,
ret
;
if
(
!
trtlp
||
!
npolls
)
{
errno
=
EINVAL
;
return
-
1
;
}
p
=
calloc
(
npolls
,
sizeof
(
struct
pollfd
));
if
(
!
p
)
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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