Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

phil-levis
Copy link
Contributor

@phil-levis phil-levis commented Feb 20, 2021

This PR

  1. removes the Tock 1.0 system calls from tock.c,
  2. changes subscribe_cb to subscribe_upcall
  3. updates driver_exists to use command2

It does not yet change the names (e.g., command2 to command). This because many userspace libraries have not been ported to the new system calls:

This causes an undefined symbol when compiling, so libtock-c is not usable/linkable. But it does compile. As these are fixed, tested, and pushed to tock-2.0-dev, I will keep this branch up to date and unblock it when it is ready.

Note that Signpost implementations haven't been ported, so they
still use the old return types. Therefore this libtock-c has
undefined symbols.
@phil-levis phil-levis mentioned this pull request Feb 20, 2021
23 tasks
@phil-levis phil-levis added blocked Blocked on promised changes or other PRs help wanted Extra attention is needed tock-2.0 Pull request is part of the transition to Tock 2.0 labels Feb 20, 2021
@hudson-ayers
Copy link
Contributor

IPC changes were merged before this PR (#176)

@hudson-ayers
Copy link
Contributor

The in-kernel AES driver was removed 3 years ago (tock/tock#684) and never brought back. At the time the removal was intended to be temporary, but it was never brought back, and I am guessing it would be a decent amount of work to bring it back and test it now. Should we block tock 2.0 on this, or just removed the userspace driver from libtock-c (and actually create an issue tracking that we want to bring it back)?

@phil-levis
Copy link
Contributor Author

The in-kernel AES driver was removed 3 years ago (tock/tock#684) and never brought back. At the time the removal was intended to be temporary, but it was never brought back, and I am guessing it would be a decent amount of work to bring it back and test it now. Should we block tock 2.0 on this, or just removed the userspace driver from libtock-c (and actually create an issue tracking that we want to bring it back)?

I'd suggest remove. It would be nice to have one, how that it's virtualized, but we should not block Tock 2.0 on this.

@phil-levis
Copy link
Contributor Author

Once all of the other PRs have stabilized, I'll do a cleanup pass of all of the callback and cb to upcall.

@phil-levis phil-levis mentioned this pull request Feb 24, 2021
18 tasks
bors bot added a commit that referenced this pull request Feb 24, 2021
178: Update temperature and humidity to use 2.0 API r=phil-levis a=phil-levis

In porting over the capsules, somehow the libtock-c parts were missed for temperature and humidity. This updates them to the 2.0 syscall API. Part of #177 

Co-authored-by: Philip Levis <[email protected]>
@phil-levis
Copy link
Contributor Author

It looks like this is now good. I will do the pass-over to transition command2 -> command, etc. tonight. I will then turn to 2.0 documentation.

@hudson-ayers
Copy link
Contributor

Something weird seems to have happened with the merge -- the "files changed" tab appears to include a bunch of the changes already merged into tock-2.0-dev by individual PRs.

@hudson-ayers
Copy link
Contributor

Oh, nevermind. The confusion is because some of those PRs (removing AES, tmp006) were merged into master after master was last merged into tock-2.0-dev

@phil-levis
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 25, 2021

👎 Rejected by label

@phil-levis
Copy link
Contributor Author

@hudson-ayers @bradjc Needs approval.

@hudson-ayers hudson-ayers removed blocked Blocked on promised changes or other PRs help wanted Extra attention is needed labels Feb 25, 2021
@hudson-ayers
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Feb 25, 2021
177: Tock 2.0 switchover r=hudson-ayers a=phil-levis

This PR 
1. removes the Tock 1.0 system calls from tock.c,
2. changes `subscribe_cb` to `subscribe_upcall`
3. updates `driver_exists` to use `command2`

It **does not** yet change the names (e.g., `command2` to `command`). This because many userspace libraries have not been ported to the new system calls:

- [x] tsl2561 @ppannuto #182
- [x] temperature @phil-levis #178 
- [x] ~aes~ 
- [x] ~st7735~ #185 
- [x] pca9544a @alevy 
- [x] lsm303dlhc #191 @alexandruradovici 
- [x] usb @alistair23 #189 
- [x] ~console~ (minor, fixed in this PR) @phil-levis #177 
- [x] proximity @alevy  #181
- [x] ltc294x @alevy #180 
- [x] ~tmp006~ #184 
- [x] l3gd20 #192 @alexandruradovici 
- [x] lps35hb #187 
- [x] humidity @phil-levis #178 
- [x] max17205 #183 
- [x] ipc @alevy #176, #177

This causes an undefined symbol when compiling, so libtock-c is not usable/linkable. But it does compile. As these are fixed, tested, and pushed to `tock-2.0-dev`, I will keep this branch up to date and unblock it when it is ready.

Co-authored-by: Philip Levis <[email protected]>
Co-authored-by: Hudson Ayers <[email protected]>
@hudson-ayers
Copy link
Contributor

bors r-

@bors
Copy link
Contributor

bors bot commented Feb 25, 2021

Canceled.

@hudson-ayers
Copy link
Contributor

I was going to revert the tmp006 commit and cherry-pick the one sent to master, but changes are split between the tmp006 commit and the subsequent merge commit, so we can just deal with the conflict next time master is merged into 2.0-dev

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 25, 2021

Build succeeded:

@bors bors bot merged commit 6f40b95 into tock-2.0-dev Feb 25, 2021
@bors bors bot deleted the tock-2.0-switchover branch February 25, 2021 06:24
bors bot added a commit to tock/tock that referenced this pull request Mar 22, 2021
2446: Tock 2.0 Alpha1 r=alevy a=bradjc

### Pull Request Overview

This pull request updates the Tock kernel to the 2.0 kernel<->userspace interface.

The current plan is to merge this on Monday, March 22, once @lschuermann has cleaned up the commit log.

**This is an API breaking change!**

Merging this PR will break the Tock 1.0 agreement with userspace. When this PR is merged, Tock is in "release mode" towards 2.0. The major version number change signifies the breaking change for userspace. We expect that merging this PR will create ~~v2.0-rc1~~ v2.0-alpha1, and further development towards v2.0 will occur on the master branch until the release.

However, merging this PR only signifies breaking the 1.0 API, it does not imply the 2.0 interface is stabilized. We expect more development before settling on the final 2.0 API.

Here are the three major items that we have to do before merging the `tock-2.0-dev` branch into master: 
1. [x] Completely wrap up the system call API/ABI updates (I think this is all that's left: tock/libtock-c#177; we might need a follow-up one for TOCK_EBADRVAL, but this is not blocking)
2. [x] Update documentation, so it is consistent with the code: Markdown files (Syscalls.md, Userland.md)
3. [x] Update documentation, so it is consistent with the code: the Tock book tock/book#13
4. [x] Update documentation, so it is consistent with the code: courses #2455 
5. [x] Overall code review (this PR)
6. [x] Change Callback to Upcall #2454 
7. [x] Change GenericSyscallReturnValue to SyscallReturn
8. [x] Clean up commit log (@lschuermann )
9. [x] libtock-c testing (@phil-levis ), tock/libtock-c#195

Then, before we can tag an RC1, we need to complete everything in #2429.

### Merge Sign-Off

This is a big change, and API breaking. It would be good to get consensus. Can you please check your name when you are ready for this PR to be merged? Doing it this way 1) allows me to participate and 2) doesn't change as new commits are added.

- ~[ ] Niklas Adolfsson, @niklasad1~ (#2495)
- [x] Hudson Ayers, @hudson-ayers
- [x] Brad Campbell, @bradjc
- [x] Branden Ghena, @brghena
- [x] Philip Levis, @phil-levis
- [x] Amit Levy, @alevy
- [x] Pat Pannuto, @ppannuto 
- [x] Johnathan Van Why, @jrvanwhy


### Testing Strategy

This PR was tested incrementally as features were added and changes were made. It was also tested at the end with libtock-c using the imix test application (which does many different system calls and system call patterns) as well as MPU test applications.


### TODO or Help Wanted

For this PR, nothing. Before release, #2429 


### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Co-authored-by: Leon Schuermann <[email protected]>
Co-authored-by: Alexandru Radovici <[email protected]>
Co-authored-by: Philip Levis <[email protected]>
Co-authored-by: Hudson Ayers <[email protected]>
tyler-potyondy pushed a commit to tyler-potyondy/libtock-c that referenced this pull request Mar 13, 2024
178: Update temperature and humidity to use 2.0 API r=phil-levis a=phil-levis

In porting over the capsules, somehow the libtock-c parts were missed for temperature and humidity. This updates them to the 2.0 syscall API. Part of tock#177 

Co-authored-by: Philip Levis <[email protected]>
tyler-potyondy pushed a commit to tyler-potyondy/libtock-c that referenced this pull request Mar 13, 2024
177: Tock 2.0 switchover r=hudson-ayers a=phil-levis

This PR 
1. removes the Tock 1.0 system calls from tock.c,
2. changes `subscribe_cb` to `subscribe_upcall`
3. updates `driver_exists` to use `command2`

It **does not** yet change the names (e.g., `command2` to `command`). This because many userspace libraries have not been ported to the new system calls:

- [x] tsl2561 @ppannuto tock#182
- [x] temperature @phil-levis tock#178 
- [x] ~aes~ 
- [x] ~st7735~ tock#185 
- [x] pca9544a @alevy 
- [x] lsm303dlhc tock#191 @alexandruradovici 
- [x] usb @alistair23 tock#189 
- [x] ~console~ (minor, fixed in this PR) @phil-levis tock#177 
- [x] proximity @alevy  tock#181
- [x] ltc294x @alevy tock#180 
- [x] ~tmp006~ tock#184 
- [x] l3gd20 tock#192 @alexandruradovici 
- [x] lps35hb tock#187 
- [x] humidity @phil-levis tock#178 
- [x] max17205 tock#183 
- [x] ipc @alevy tock#176, tock#177

This causes an undefined symbol when compiling, so libtock-c is not usable/linkable. But it does compile. As these are fixed, tested, and pushed to `tock-2.0-dev`, I will keep this branch up to date and unblock it when it is ready.

Co-authored-by: Philip Levis <[email protected]>
Co-authored-by: Hudson Ayers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tock-2.0 Pull request is part of the transition to Tock 2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants