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
b7b0adb9
Commit
b7b0adb9
authored
Apr 26, 2021
by
Raptor Engineering Development Team
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix POST code decoding
Enable console POST codes by default
parent
d1321594
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
kestrel/src/kestrel.c
kestrel/src/kestrel.c
+7
-6
No files found.
kestrel/src/kestrel.c
View file @
b7b0adb9
...
...
@@ -68,7 +68,7 @@ extern uint8_t irq_unhandled_source_valid;
#define VUART_RING_BUFFER_SIZE 512
// Interrupt transient POST code buffer
static
uint
8
_t
post_code_incoming_interrupt_transient_buffer
[
POST_CODE_INTERRUPT_TRANSIENT_BUFFER_SIZE
];
static
uint
16
_t
post_code_incoming_interrupt_transient_buffer
[
POST_CODE_INTERRUPT_TRANSIENT_BUFFER_SIZE
];
static
int
post_code_incoming_interrupt_transient_buffer_pos
=
0
;
static
uint8_t
post_code_incoming_interrupt_transient_buffer_overflow
=
0
;
...
...
@@ -126,7 +126,7 @@ uint8_t post_code_low = 0;
// Global configuration
static
uint8_t
allow_flash_write
=
0
;
static
uint8_t
enable_post_code_console_output
=
0
;
static
uint8_t
enable_post_code_console_output
=
1
;
// External service interface
struct
firmware_buffer_region
main_firmware_buffer
;
...
...
@@ -571,7 +571,7 @@ void lpc_slave_isr(void)
post_code_low
=
post_code
;
if
(
post_code_incoming_interrupt_transient_buffer_pos
<
POST_CODE_INTERRUPT_TRANSIENT_BUFFER_SIZE
)
{
post_code_incoming_interrupt_transient_buffer
[
post_code_incoming_interrupt_transient_buffer_pos
]
=
((
post_code_high
&
0xf
)
<<
4
)
|
(
post_code_low
&
0x
f
);
post_code_incoming_interrupt_transient_buffer
[
post_code_incoming_interrupt_transient_buffer_pos
]
=
((
post_code_high
&
0xf
f
)
<<
8
)
|
(
post_code_low
&
0xf
f
);
post_code_incoming_interrupt_transient_buffer_pos
++
;
}
else
...
...
@@ -1733,11 +1733,12 @@ static int process_interrupts_stage2(void)
while
(
read_position
<
post_code_incoming_interrupt_transient_buffer_pos
)
{
uint16_t
post_code
=
post_code_incoming_interrupt_transient_buffer
[
read_position
];
set_led_bank_display
(
post_code
);
uint8_t
led_post_code
=
(((
post_code
>>
8
)
&
0xf
)
<<
4
)
|
(
post_code
&
0xf
);
set_led_bank_display
(
led_post_code
);
if
(
enable_post_code_console_output
)
{
KESTREL_LOG
(
"[POST CODE] %d.%d"
,
(
post_code
>>
4
)
&
0xf
,
post_code
&
0x
f
);
KESTREL_LOG
(
"[POST CODE] %d.%d"
,
(
post_code
>>
8
)
&
0xff
,
post_code
&
0xf
f
);
}
read_position
++
;
}
...
...
@@ -3530,7 +3531,7 @@ int kestrel_init(void)
tercel_spi_flash_init
(
BMCSPIFLASHCFG_BASE
,
BMCSPIFLASH_BASE
,
1
,
0
,
0
);
// Detect and print attached host SPI Flash ID
KESTREL_LOG
(
"
Host
SPI flash ID: 0x%08x"
,
read_host_spi_flash_id
(
BMCSPIFLASHCFG_BASE
,
BMCSPIFLASH_BASE
));
KESTREL_LOG
(
"
BMC
SPI flash ID: 0x%08x"
,
read_host_spi_flash_id
(
BMCSPIFLASHCFG_BASE
,
BMCSPIFLASH_BASE
));
reset_flash_device
(
BMCSPIFLASHCFG_BASE
,
BMCSPIFLASH_BASE
);
configure_flash_device
(
BMCSPIFLASHCFG_BASE
,
BMCSPIFLASH_BASE
);
...
...
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