Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zephyr Firmware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel Firmware
Zephyr Firmware
Commits
ae742fff
Commit
ae742fff
authored
Apr 21, 2021
by
Raptor Engineering Development Team
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
944e37f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
8 deletions
+20
-8
kestrel/src/kestrel.c
kestrel/src/kestrel.c
+14
-4
kestrel/src/kestrel.h
kestrel/src/kestrel.h
+2
-2
kestrel/src/shell.c
kestrel/src/shell.c
+1
-1
prj.conf
prj.conf
+3
-1
No files found.
kestrel/src/kestrel.c
View file @
ae742fff
...
...
@@ -1452,6 +1452,9 @@ static int process_host_to_bmc_ipmi_bt_transactions(void)
}
#if (ENABLE_LPC_FW_CYCLE_DMA)
// Deactivate interrupts on entering critical section
int
key
=
irq_lock
();
// Disable DMA engine
dword
=
read_aquila_register
(
HOSTLPCSLAVE_BASE
,
AQUILA_LPC_REG_DMA_CONFIG1
);
dword
&=
~
((
1
&
AQUILA_LPC_CTL_EN_FW_DMA_R_MASK
)
<<
AQUILA_LPC_CTL_EN_FW_DMA_R_SHIFT
);
...
...
@@ -1512,6 +1515,9 @@ static int process_host_to_bmc_ipmi_bt_transactions(void)
dword
&=
~
((
1
&
AQUILA_LPC_CTL_EN_FW_DMA_W_MASK
)
<<
AQUILA_LPC_CTL_EN_FW_DMA_W_SHIFT
);
}
write_aquila_register
(
HOSTLPCSLAVE_BASE
,
AQUILA_LPC_REG_DMA_CONFIG1
,
dword
);
// Re-activate interupts on exiting critical section
irq_unlock
(
key
);
#endif
// Generate response
...
...
@@ -1701,10 +1707,12 @@ static int process_interrupts_stage2(void)
int
read_position
;
int
work_executed
;
#if (WITH_ZEPHYR)
if
(
k_mutex_lock
(
&
vuart1_access_mutex
,
K_MSEC
(
100
))
!=
0
)
{
printk
(
"Unable to acquire VUART1 mutex in a timely manner! %s:%d
\n
"
,
__FILE__
,
__LINE__
);
return
-
EAGAIN
;
}
#endif
work_executed
=
0
;
...
...
@@ -2759,6 +2767,7 @@ int host_console_event_loop(const struct shell *shell)
}
if
(
chars_to_tx
>
0
)
{
chars_sent
=
0
;
if
(
shell
->
iface
->
api
->
write
(
shell
->
iface
,
vuart1_incoming_buffer
+
vuart1_incoming_buffer_read_pos
,
chars_to_tx
,
&
chars_sent
)
==
0
)
{
if
(
chars_sent
>
0
)
{
vuart1_incoming_buffer_read_pos
+=
chars_sent
;
...
...
@@ -2783,8 +2792,10 @@ int host_console_event_loop(const struct shell *shell)
}
int
attach_to_host_console
(
const
struct
shell
*
shell
)
{
// Deactivate interrupts on entering critical section
int
key
=
irq_lock
();
if
(
k_mutex_lock
(
&
vuart1_access_mutex
,
K_MSEC
(
100
))
!=
0
)
{
printk
(
"Unable to acquire VUART1 mutex in a timely manner! %s:%d
\n
"
,
__FILE__
,
__LINE__
);
return
-
EAGAIN
;
}
// Reset VUART1 ring buffer pointers
vuart1_outgoing_buffer_read_pos
=
vuart1_outgoing_buffer_write_pos
;
...
...
@@ -2793,8 +2804,7 @@ int attach_to_host_console(const struct shell *shell)
host_console_service_task_requested
=
1
;
host_console_service_task_shell
=
shell
;
// Re-activate interupts on exiting critical section
irq_unlock
(
key
);
k_mutex_unlock
(
&
vuart1_access_mutex
);
return
0
;
}
...
...
kestrel/src/kestrel.h
View file @
ae742fff
...
...
@@ -8,7 +8,7 @@
#endif
#if (WITH_ZEPHYR)
#define KESTREL_SERVICE_THREAD_PRIORITY K_PRIO_
COOP(
1)
#define KESTREL_SERVICE_THREAD_PRIORITY K_PRIO_
PREEMPT(CONFIG_NUM_PREEMPT_PRIORITIES -
1)
#endif
struct
firmware_buffer_region
{
...
...
@@ -44,4 +44,4 @@ int attach_to_host_console(const struct shell *shell);
int
host_console_event_loop
(
const
struct
shell
*
shell
);
#else
int
attach_to_host_console
();
#endif
\ No newline at end of file
#endif
kestrel/src/shell.c
View file @
ae742fff
...
...
@@ -220,4 +220,4 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_kestrel,
);
// Register main kestrel command prefix
SHELL_CMD_REGISTER
(
kestrel
,
&
sub_kestrel
,
"Kestrel commands"
,
NULL
);
\ No newline at end of file
SHELL_CMD_REGISTER
(
kestrel
,
&
sub_kestrel
,
"Kestrel commands"
,
NULL
);
prj.conf
View file @
ae742fff
...
...
@@ -42,10 +42,12 @@ CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE
=
100663296
# Logging settings
#CONFIG_LOG_MODE_MINIMAL=y
CONFIG_LOG_MODE_IMMEDIATE
=
y
#CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_RUNTIME_FILTERING
=
y
CONFIG_LOG_BUFFER_SIZE
=
1024
CONFIG_LOG_PRINTK
=
y
CONFIG_LOG_PRINTK
=
n
CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD
=
0
# POSIX options
...
...
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