aboutsummaryrefslogtreecommitdiff
path: root/bbl/bbl.c
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2017-02-20 21:43:09 -0800
committerAndrew Waterman <andrew@sifive.com>2017-02-20 21:43:09 -0800
commitf6bca6e35b66632afad68f6b7fb2b3203c8502fb (patch)
tree3f8d691713d96ef4e7f57b8504691e68cdcda6f7 /bbl/bbl.c
parent59484c94e161b0f1870096cfb183533b20569669 (diff)
downloadpk-f6bca6e35b66632afad68f6b7fb2b3203c8502fb.zip
pk-f6bca6e35b66632afad68f6b7fb2b3203c8502fb.tar.gz
pk-f6bca6e35b66632afad68f6b7fb2b3203c8502fb.tar.bz2
Don't block for acks on console writes
Diffstat (limited to 'bbl/bbl.c')
-rw-r--r--bbl/bbl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/bbl/bbl.c b/bbl/bbl.c
index bdd56ad..9553ddb 100644
--- a/bbl/bbl.c
+++ b/bbl/bbl.c
@@ -6,24 +6,25 @@
#include "config.h"
#include <string.h>
-static volatile uintptr_t entry_point;
+static const void* entry_point;
void boot_other_hart()
{
- while (!entry_point)
- ;
- mb();
- enter_supervisor_mode((void *)entry_point, read_csr(mhartid), 0);
+ const void* entry;
+ do {
+ entry = entry_point;
+ mb();
+ } while (!entry);
+ enter_supervisor_mode(entry, read_csr(mhartid), 0);
}
void boot_loader()
{
- extern char _payload_start, _payload_end;
- uintptr_t entry = load_kernel_elf(&_payload_start, &_payload_end - &_payload_start);
+ extern char _payload_start;
#ifdef PK_ENABLE_LOGO
print_logo();
#endif
mb();
- entry_point = entry;
+ entry_point = &_payload_start;
boot_other_hart();
}