-
Notifications
You must be signed in to change notification settings - Fork 0
feat: promote all qemu/cortex components to cortex_m #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1541b9d
feat(hal/cortex_m): add LowPriorityInterrupt and DataWatchpointAndTrace
gabrielfrasantos f4cf5b5
fix(hal/cortex_m): restore unconditional invoke with no-op sentinel
gabrielfrasantos cf1a5da
refactor(hal/cortex_m): enforce single LowPriorityInterrupt instance
gabrielfrasantos 017b3d7
feat(hal/cortex_m): promote all qemu/cortex components to cortex_m
gabrielfrasantos acab122
Merge branch 'main' into feat/cortex-m-generalize-hal
gabrielfrasantos 5a9a492
Update hal/cortex_m/EventDispatcherCortex.cpp
gabrielfrasantos 3c03945
Update hal/qemu/default_init/EventInfrastructure.hpp
gabrielfrasantos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,38 @@ | ||
| #include "hal/cortex_m/EventDispatcherCortex.hpp" | ||
|
|
||
| namespace | ||
| { | ||
| void Dsb() | ||
| { | ||
| __asm volatile("dsb" ::: "memory"); | ||
| } | ||
|
|
||
| void Wfe() | ||
| { | ||
| __asm volatile("wfe"); | ||
| } | ||
|
|
||
| void Sev() | ||
| { | ||
| __asm volatile("sev"); | ||
| } | ||
| } | ||
|
|
||
| namespace hal::cortex | ||
| { | ||
| EventDispatcherCortexWorker::EventDispatcherCortexWorker(infra::MemoryRange<std::pair<infra::Function<void()>, std::atomic<bool>>> scheduledActionsStorage) | ||
| : infra::EventDispatcherWorkerImpl(scheduledActionsStorage) | ||
| {} | ||
|
|
||
| void EventDispatcherCortexWorker::Idle() | ||
| { | ||
| Dsb(); | ||
| Wfe(); | ||
| } | ||
|
|
||
| void EventDispatcherCortexWorker::RequestExecution() | ||
| { | ||
| Dsb(); | ||
| Sev(); | ||
| } | ||
| } |
This file contains hidden or 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,22 @@ | ||
| #ifndef HAL_CORTEX_M_EVENT_DISPATCHER_CORTEX_HPP | ||
| #define HAL_CORTEX_M_EVENT_DISPATCHER_CORTEX_HPP | ||
|
|
||
| #include "infra/event/EventDispatcher.hpp" | ||
|
|
||
| namespace hal::cortex | ||
| { | ||
| class EventDispatcherCortexWorker | ||
| : public infra::EventDispatcherWorkerImpl | ||
| { | ||
| public: | ||
| explicit EventDispatcherCortexWorker(infra::MemoryRange<std::pair<infra::Function<void()>, std::atomic<bool>>> scheduledActionsStorage); | ||
|
|
||
| protected: | ||
| void Idle() override; | ||
| void RequestExecution() override; | ||
| }; | ||
|
|
||
| using EventDispatcherCortex = infra::EventDispatcherConnector<EventDispatcherCortexWorker>; | ||
| } | ||
|
|
||
| #endif |
This file contains hidden or 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
This file contains hidden or 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,16 @@ | ||
| #ifndef HAL_CORTEX_M_RESET_HPP | ||
| #define HAL_CORTEX_M_RESET_HPP | ||
|
|
||
| #include "hal/interfaces/Reset.hpp" | ||
|
|
||
| namespace hal::cortex | ||
| { | ||
| class Reset | ||
| : public hal::Reset | ||
| { | ||
| public: | ||
| void ResetModule(const char* resetReason) override; | ||
| }; | ||
| } | ||
|
|
||
| #endif |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #include "hal/qemu/cortex/Semihosting.hpp" | ||
| #include "hal/cortex_m/Semihosting.hpp" | ||
|
|
||
| namespace hal::cortex | ||
| { | ||
|
|
||
4 changes: 2 additions & 2 deletions
4
hal/qemu/cortex/Semihosting.hpp → hal/cortex_m/Semihosting.hpp
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
hal/qemu/cortex/SystemTickTimerService.cpp → hal/cortex_m/SystemTickTimerService.cpp
This file contains hidden or 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
6 changes: 3 additions & 3 deletions
6
hal/qemu/cortex/SystemTickTimerService.hpp → hal/cortex_m/SystemTickTimerService.hpp
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.