forked from M-Labs/artiq
1
0
Fork 0

Revert "firmware: workaround for RPC failures"

This reverts commit 59033d2588.
This commit is contained in:
whitequark 2018-11-12 15:36:36 +00:00
parent 0edae64afb
commit 583bba8777
3 changed files with 0 additions and 19 deletions

View File

@ -101,7 +101,6 @@ mod api;
mod rtio; mod rtio;
mod nrt_bus; mod nrt_bus;
static mut NOW: u64 = 0;
static mut LIBRARY: Option<Library<'static>> = None; static mut LIBRARY: Option<Library<'static>> = None;
#[no_mangle] #[no_mangle]
@ -186,7 +185,6 @@ fn terminate(exception: &eh_artiq::Exception, backtrace: &mut [usize]) -> ! {
} }
let backtrace = &mut backtrace.as_mut()[0..cursor]; let backtrace = &mut backtrace.as_mut()[0..cursor];
send(&NowSave(unsafe { NOW }));
send(&RunException { send(&RunException {
exception: kernel_proto::Exception { exception: kernel_proto::Exception {
name: str::from_utf8(exception.name.as_ref()).unwrap(), name: str::from_utf8(exception.name.as_ref()).unwrap(),
@ -510,10 +508,7 @@ pub unsafe fn main() {
ptr::write_bytes(__bss_start as *mut u8, 0, (_end - __bss_start) as usize); ptr::write_bytes(__bss_start as *mut u8, 0, (_end - __bss_start) as usize);
send(&NowInitRequest);
recv!(&NowInitReply(now) => NOW = now);
(mem::transmute::<u32, fn()>(__modinit__))(); (mem::transmute::<u32, fn()>(__modinit__))();
send(&NowSave(NOW));
if let Some(typeinfo) = typeinfo { if let Some(typeinfo) = typeinfo {
attribute_writeback(typeinfo as *const ()); attribute_writeback(typeinfo as *const ());

View File

@ -22,10 +22,6 @@ pub enum Message<'a> {
LoadRequest(&'a [u8]), LoadRequest(&'a [u8]),
LoadReply(Result<(), dyld::Error<'a>>), LoadReply(Result<(), dyld::Error<'a>>),
NowInitRequest,
NowInitReply(u64),
NowSave(u64),
RtioInitRequest, RtioInitRequest,
RtioDestinationStatusRequest { destination: u8 }, RtioDestinationStatusRequest { destination: u8 },

View File

@ -63,7 +63,6 @@ macro_rules! unexpected {
// Persistent state // Persistent state
#[derive(Debug)] #[derive(Debug)]
struct Congress { struct Congress {
now: u64,
cache: Cache, cache: Cache,
dma_manager: DmaManager, dma_manager: DmaManager,
finished_cleanly: Cell<bool> finished_cleanly: Cell<bool>
@ -72,7 +71,6 @@ struct Congress {
impl Congress { impl Congress {
fn new() -> Congress { fn new() -> Congress {
Congress { Congress {
now: 0,
cache: Cache::new(), cache: Cache::new(),
dma_manager: DmaManager::new(), dma_manager: DmaManager::new(),
finished_cleanly: Cell::new(true) finished_cleanly: Cell::new(true)
@ -365,14 +363,6 @@ fn process_kern_message(io: &Io, aux_mutex: &Mutex,
kern_acknowledge() kern_acknowledge()
} }
&kern::NowInitRequest =>
kern_send(io, &kern::NowInitReply(session.congress.now)),
&kern::NowSave(now) => {
session.congress.now = now;
kern_acknowledge()
}
&kern::DmaRecordStart(name) => { &kern::DmaRecordStart(name) => {
session.congress.dma_manager.record_start(name); session.congress.dma_manager.record_start(name);
kern_acknowledge() kern_acknowledge()