From 357be4858e678567f54a447973f8b220b60abb94 Mon Sep 17 00:00:00 2001 From: equation314 Date: Fri, 3 Apr 2020 15:18:21 +0800 Subject: [PATCH 1/8] Add fbdev to DevFS --- kernel/src/fs/{vga.rs => fbdev.rs} | 73 ++++++++++++++++++++++-------- kernel/src/fs/mod.rs | 10 ++-- kernel/src/fs/pseudo.rs | 2 +- kernel/src/syscall/fs.rs | 8 +--- 4 files changed, 61 insertions(+), 32 deletions(-) rename kernel/src/fs/{vga.rs => fbdev.rs} (79%) diff --git a/kernel/src/fs/vga.rs b/kernel/src/fs/fbdev.rs similarity index 79% rename from kernel/src/fs/vga.rs rename to kernel/src/fs/fbdev.rs index e3f7d3b6..e33468f1 100755 --- a/kernel/src/fs/vga.rs +++ b/kernel/src/fs/fbdev.rs @@ -6,27 +6,60 @@ use alloc::{string::String, sync::Arc, vec::Vec}; use core::any::Any; #[derive(Default)] -pub struct Vga; +pub struct Fbdev; -impl INode for Vga { +impl INode for Fbdev { fn read_at(&self, offset: usize, buf: &mut [u8]) -> Result { - Err(FsError::NotSupported) - } - fn write_at(&self, _offset: usize, _buf: &[u8]) -> Result { - info!("the _offset is {} {}", _offset, _buf[0]); - let lock = FRAME_BUFFER.lock(); - if let Some(ref frame_buffer) = *lock { - use core::slice; + info!( + "fbdev read_at: offset={:#x} buf_len={:#x}", + offset, + buf.len() + ); + if let Some(mut frame_buffer) = FRAME_BUFFER.lock().as_ref() { + let mut count = buf.len(); + if offset > frame_buffer.framebuffer_size() { + return Ok(0); + } + if offset + count > frame_buffer.framebuffer_size() { + count = frame_buffer.framebuffer_size() - offset; + } let frame_buffer_data = unsafe { - slice::from_raw_parts_mut( - frame_buffer.base_addr() as *mut u8, - frame_buffer.framebuffer_size(), + core::slice::from_raw_parts((frame_buffer.base_addr() + offset) as *const u8, count) + }; + buf[..count].copy_from_slice(&frame_buffer_data); + Ok(count) + } else { + Err(FsError::NoDevice) + } + } + fn write_at(&self, offset: usize, buf: &[u8]) -> Result { + info!( + "fbdev write_at: offset={:#x} buf_len={:#x}", + offset, + buf.len() + ); + if let Some(mut frame_buffer) = FRAME_BUFFER.lock().as_mut() { + let mut count = buf.len(); + if offset > frame_buffer.framebuffer_size() { + return Ok(0); + } + if offset + count > frame_buffer.framebuffer_size() { + count = frame_buffer.framebuffer_size() - offset; + } + let frame_buffer_data = unsafe { + core::slice::from_raw_parts_mut( + (frame_buffer.base_addr() + offset) as *mut u8, + count, ) }; - frame_buffer_data.copy_from_slice(&_buf); - Ok(frame_buffer.framebuffer_size()) + frame_buffer_data.copy_from_slice(&buf[..count]); + if count == buf.len() { + Ok(count) + } else { + Err(FsError::NoDeviceSpace) + } } else { - Err(FsError::EntryNotFound) + Err(FsError::NoDevice) } } fn poll(&self) -> Result { @@ -41,18 +74,18 @@ impl INode for Vga { Ok(Metadata { dev: 0, inode: 0, - size: 0x24000, + size: 0, blk_size: 0, blocks: 0, atime: Timespec { sec: 0, nsec: 0 }, mtime: Timespec { sec: 0, nsec: 0 }, ctime: Timespec { sec: 0, nsec: 0 }, - type_: FileType::SymLink, - mode: 0, - nlinks: 0, + type_: FileType::CharDevice, + mode: 0o660, + nlinks: 1, uid: 0, gid: 0, - rdev: 0, + rdev: make_rdev(29, 0), }) } fn io_control(&self, cmd: u32, data: usize) -> Result<()> { diff --git a/kernel/src/fs/mod.rs b/kernel/src/fs/mod.rs index 75e812b9..46746b63 100644 --- a/kernel/src/fs/mod.rs +++ b/kernel/src/fs/mod.rs @@ -15,10 +15,8 @@ pub use self::pipe::Pipe; pub use self::pseudo::*; pub use self::random::*; pub use self::stdio::{STDIN, STDOUT}; -pub use self::vga::*; mod device; -pub mod epoll; mod file; mod file_like; mod ioctl; @@ -26,7 +24,8 @@ mod pipe; mod pseudo; mod random; mod stdio; -pub mod vga; +pub mod epoll; +pub mod fbdev; // Hard link user programs #[cfg(feature = "link_user")] @@ -84,8 +83,9 @@ lazy_static! { let devfs = DevFS::new(); devfs.add("null", Arc::new(NullINode::default())).expect("failed to mknod /dev/null"); devfs.add("zero", Arc::new(ZeroINode::default())).expect("failed to mknod /dev/zero"); - devfs.add("random", Arc::new(RandomINode::new(false))).expect("failed to mknod /dev/zero"); - devfs.add("urandom", Arc::new(RandomINode::new(true))).expect("failed to mknod /dev/zero"); + devfs.add("random", Arc::new(RandomINode::new(false))).expect("failed to mknod /dev/random"); + devfs.add("urandom", Arc::new(RandomINode::new(true))).expect("failed to mknod /dev/urandom"); + devfs.add("fb0", Arc::new(fbdev::Fbdev::default())).expect("failed to mknod /dev/fb0"); // mount DevFS at /dev let dev = root.find(true, "dev").unwrap_or_else(|_| { diff --git a/kernel/src/fs/pseudo.rs b/kernel/src/fs/pseudo.rs index 5f01a954..0216d731 100644 --- a/kernel/src/fs/pseudo.rs +++ b/kernel/src/fs/pseudo.rs @@ -50,7 +50,7 @@ impl INode for Pseudo { ctime: Timespec { sec: 0, nsec: 0 }, type_: self.type_, mode: 0, - nlinks: 0, + nlinks: 1, uid: 0, gid: 0, rdev: 0, diff --git a/kernel/src/syscall/fs.rs b/kernel/src/syscall/fs.rs index f4e2213c..c9be7592 100644 --- a/kernel/src/syscall/fs.rs +++ b/kernel/src/syscall/fs.rs @@ -1146,10 +1146,6 @@ impl Process { "/proc/self/exe" => { return Ok(Arc::new(Pseudo::new(&self.exec_path, FileType::SymLink))); } - "/dev/fb0" => { - info!("/dev/fb0 will be opened"); - return Ok(Arc::new(Vga::default())); - } _ => {} } let (fd_dir_path, fd_name) = split_path(&path); @@ -1575,7 +1571,7 @@ impl From for Stat { nlink: info.nlinks as u32, uid: info.uid as u32, gid: info.gid as u32, - rdev: 0, + rdev: info.rdev as u64, size: info.size as u64, blksize: info.blk_size as u32, blocks: info.blocks as u64, @@ -1606,7 +1602,7 @@ impl From for Stat { nlink: info.nlinks as u32, uid: info.uid as u32, gid: info.gid as u32, - rdev: 0, + rdev: info.rdev as u64, size: info.size as u64, blksize: info.blk_size as u32, blocks: info.blocks as u64, From f1e5b94ec55e3dcad86be29b2519b2a9ae4be3f3 Mon Sep 17 00:00:00 2001 From: equation314 Date: Sat, 4 Apr 2020 14:24:06 +0800 Subject: [PATCH 2/8] Dispatch mmap operation of files in FileHandle --- kernel/src/fs/fbdev.rs | 30 +++++++++++++++--- kernel/src/fs/file.rs | 32 ++++++++++++++++++- kernel/src/fs/file_like.rs | 12 +++++--- kernel/src/fs/mod.rs | 4 +-- kernel/src/syscall/mem.rs | 63 ++++++++++---------------------------- 5 files changed, 84 insertions(+), 57 deletions(-) diff --git a/kernel/src/fs/fbdev.rs b/kernel/src/fs/fbdev.rs index e33468f1..7ad5be8c 100755 --- a/kernel/src/fs/fbdev.rs +++ b/kernel/src/fs/fbdev.rs @@ -1,10 +1,10 @@ -use rcore_fs::vfs::*; - use crate::drivers::gpu::fb::{ColorFormat, FramebufferInfo, FRAME_BUFFER}; -use crate::memory::phys_to_virt; -use alloc::{string::String, sync::Arc, vec::Vec}; +use crate::syscall::MmapProt; use core::any::Any; +use rcore_fs::vfs::*; +use rcore_memory::memory_set::handler::Linear; + #[derive(Default)] pub struct Fbdev; @@ -113,6 +113,28 @@ impl INode for Fbdev { } } } + fn mmap(&self, area: MMapArea) -> Result<()> { + let attr = MmapProt::from_bits_truncate(area.prot).to_attr(); + #[cfg(target_arch = "aarch64")] + let attr = attr.mmio(crate::arch::paging::MMIOType::NormalNonCacheable as u8); + + if let Some(fb) = FRAME_BUFFER.lock().as_ref() { + if area.offset + area.end_vaddr - area.start_vaddr > fb.framebuffer_size() { + return Err(FsError::NoDeviceSpace); + } + let thread = unsafe { crate::process::current_thread() }; + thread.vm.lock().push( + area.start_vaddr, + area.end_vaddr, + attr, + Linear::new((fb.paddr() + area.offset - area.start_vaddr) as isize), + "mmap_file", + ); + Ok(()) + } else { + Err(FsError::NoDevice) + } + } fn as_any_ref(&self) -> &dyn Any { self } diff --git a/kernel/src/fs/file.rs b/kernel/src/fs/file.rs index 705debbb..4310bfe5 100644 --- a/kernel/src/fs/file.rs +++ b/kernel/src/fs/file.rs @@ -1,10 +1,14 @@ //! File handle for process +use crate::memory::GlobalFrameAlloc; +use crate::process::{current_thread, INodeForMap}; +use crate::syscall::MmapProt; use crate::thread; use alloc::{string::String, sync::Arc}; use core::fmt; -use rcore_fs::vfs::{FsError, INode, Metadata, PollStatus, Result}; +use rcore_fs::vfs::{FileType, FsError, INode, MMapArea, Metadata, PollStatus, Result}; +use rcore_memory::memory_set::handler::File; #[derive(Clone)] pub struct FileHandle { @@ -141,6 +145,32 @@ impl FileHandle { self.inode.io_control(cmd, arg) } + pub fn mmap(&mut self, area: MMapArea) -> Result<()> { + info!("mmap file path is {}", self.path); + match self.inode.metadata()?.type_ { + FileType::File => { + let prot = MmapProt::from_bits_truncate(area.prot); + let thread = unsafe { crate::process::current_thread() }; + thread.vm.lock().push( + area.start_vaddr, + area.end_vaddr, + prot.to_attr(), + File { + file: INodeForMap(self.inode.clone()), + mem_start: area.start_vaddr, + file_start: area.offset, + file_end: area.offset + area.end_vaddr - area.start_vaddr, + allocator: GlobalFrameAlloc, + }, + "mmap_file", + ); + Ok(()) + } + FileType::CharDevice => self.inode.mmap(area), + _ => Err(FsError::NotSupported), + } + } + pub fn inode(&self) -> Arc { self.inode.clone() } diff --git a/kernel/src/fs/file_like.rs b/kernel/src/fs/file_like.rs index e180f4dc..d13f6eb7 100644 --- a/kernel/src/fs/file_like.rs +++ b/kernel/src/fs/file_like.rs @@ -4,11 +4,9 @@ use super::ioctl::*; use super::FileHandle; use crate::fs::epoll::EpollInstance; use crate::net::Socket; -use crate::sync::Condvar; use crate::syscall::{SysError, SysResult}; use alloc::boxed::Box; -use alloc::vec::Vec; -use rcore_fs::vfs::PollStatus; +use rcore_fs::vfs::{MMapArea, PollStatus}; // TODO: merge FileLike to FileHandle ? // TODO: fix dup and remove Clone @@ -59,6 +57,13 @@ impl FileLike { } } } + pub fn mmap(&mut self, area: MMapArea) -> SysResult { + match self { + FileLike::File(file) => file.mmap(area)?, + _ => return Err(SysError::ENOSYS), + }; + Ok(0) + } pub fn poll(&self) -> Result { let status = match self { FileLike::File(file) => file.poll()?, @@ -72,7 +77,6 @@ impl FileLike { }; Ok(status) } - pub fn fcntl(&mut self, cmd: usize, arg: usize) -> SysResult { match self { FileLike::File(file) => file.fcntl(cmd, arg)?, diff --git a/kernel/src/fs/mod.rs b/kernel/src/fs/mod.rs index 46746b63..951572e7 100644 --- a/kernel/src/fs/mod.rs +++ b/kernel/src/fs/mod.rs @@ -17,6 +17,8 @@ pub use self::random::*; pub use self::stdio::{STDIN, STDOUT}; mod device; +pub mod epoll; +pub mod fbdev; mod file; mod file_like; mod ioctl; @@ -24,8 +26,6 @@ mod pipe; mod pseudo; mod random; mod stdio; -pub mod epoll; -pub mod fbdev; // Hard link user programs #[cfg(feature = "link_user")] diff --git a/kernel/src/syscall/mem.rs b/kernel/src/syscall/mem.rs index 247182b8..7d98deca 100644 --- a/kernel/src/syscall/mem.rs +++ b/kernel/src/syscall/mem.rs @@ -1,15 +1,15 @@ -use rcore_memory::memory_set::handler::{Delay, File, Linear}; +use rcore_fs::vfs::MMapArea; +use rcore_memory::memory_set::handler::Delay; use rcore_memory::memory_set::MemoryAttr; use rcore_memory::PAGE_SIZE; -use crate::memory::GlobalFrameAlloc; - use super::*; +use crate::memory::GlobalFrameAlloc; impl Syscall<'_> { pub fn sys_mmap( &mut self, - mut addr: usize, + addr: usize, len: usize, prot: usize, flags: usize, @@ -24,6 +24,7 @@ impl Syscall<'_> { ); let mut proc = self.process(); + let mut addr = addr; if addr == 0 { // although NULL can be a valid address // but in C, NULL is regarded as allocation failure @@ -49,49 +50,18 @@ impl Syscall<'_> { Delay::new(GlobalFrameAlloc), "mmap_anon", ); - return Ok(addr); + Ok(addr) } else { - let file = proc.get_file(fd)?; - info!("mmap path is {} ", &*file.path); - match &*file.path { - "/dev/fb0" => { - use crate::drivers::gpu::fb::FRAME_BUFFER; - let attr = prot.to_attr(); - #[cfg(feature = "board_raspi3")] - let attr = attr.mmio(crate::arch::paging::MMIOType::NormalNonCacheable as u8); - - if let Some(fb) = FRAME_BUFFER.lock().as_ref() { - self.vm().push( - addr, - addr + len, - attr, - Linear::new((fb.paddr() - addr) as isize), - "mmap_file", - ); - info!("mmap for /dev/fb0"); - return Ok(addr); - } else { - return Err(SysError::ENOENT); - } - } - _ => { - let inode = file.inode(); - self.vm().push( - addr, - addr + len, - prot.to_attr(), - File { - file: INodeForMap(inode), - mem_start: addr, - file_start: offset, - file_end: offset + len, - allocator: GlobalFrameAlloc, - }, - "mmap_file", - ); - return Ok(addr); - } + let file_like = proc.get_file_like(fd)?; + let area = MMapArea { + start_vaddr: addr, + end_vaddr: addr + len, + prot: prot.bits(), + flags: flags.bits(), + offset, }; + file_like.mmap(area)?; + Ok(addr) } } @@ -121,6 +91,7 @@ impl Syscall<'_> { Ok(0) } } + bitflags! { pub struct MmapProt: usize { /// Data cannot be accessed @@ -163,7 +134,7 @@ bitflags! { } impl MmapProt { - fn to_attr(self) -> MemoryAttr { + pub fn to_attr(self) -> MemoryAttr { let mut attr = MemoryAttr::default().user(); if self.contains(MmapProt::EXEC) { attr = attr.execute(); From f95b863d80e2f1a80f52d992895c4c56ba44a028 Mon Sep 17 00:00:00 2001 From: equation314 Date: Sat, 4 Apr 2020 16:52:52 +0800 Subject: [PATCH 3/8] Add read_at/write_at functions to Framebuffer --- kernel/src/drivers/console/mod.rs | 2 +- kernel/src/drivers/gpu/fb.rs | 66 ++++++++++++++++++++++--------- kernel/src/fs/fbdev.rs | 38 ++++-------------- 3 files changed, 56 insertions(+), 50 deletions(-) diff --git a/kernel/src/drivers/console/mod.rs b/kernel/src/drivers/console/mod.rs index f2ccb5df..eb371e44 100644 --- a/kernel/src/drivers/console/mod.rs +++ b/kernel/src/drivers/console/mod.rs @@ -12,7 +12,7 @@ pub static CONSOLE: Mutex> = Mutex::new(None); /// Initialize console driver pub fn init() { if cfg!(feature = "consolegraphic") { - if let Some(fb) = FRAME_BUFFER.lock().take() { + if let Some(fb) = FRAME_BUFFER.write().take() { // FIXME: now take FrameBuffer out of global variable, then move into Console let console = Console::on_frame_buffer(fb.fb_info.xres, fb.fb_info.yres, fb); *CONSOLE.lock() = Some(console); diff --git a/kernel/src/drivers/gpu/fb.rs b/kernel/src/drivers/gpu/fb.rs index a3745f23..a65948f0 100644 --- a/kernel/src/drivers/gpu/fb.rs +++ b/kernel/src/drivers/gpu/fb.rs @@ -4,7 +4,7 @@ use alloc::string::String; use core::fmt; use lazy_static::lazy_static; use log::*; -use spin::Mutex; +use spin::RwLock; /// Framebuffer information #[repr(C)] @@ -195,23 +195,48 @@ impl Framebuffer { } } - /// Copy buffer `[src_off .. src_off + size]` to `[dst_off .. dst_off + size]`. - /// `dst_off`, `src_off` and `size` must be aligned with `usize`. - pub fn copy(&mut self, dst_off: usize, src_off: usize, size: usize) { - const USIZE: usize = core::mem::size_of::(); - let mut dst = self.base_addr() + dst_off; - let mut src = self.base_addr() + src_off; - let src_end = src + size; - while src < src_end { - unsafe { *(dst as *mut usize) = *(src as *mut usize) } - dst += USIZE; - src += USIZE; + /// Read buffer data starts at `offset` to `buf`. + pub fn read_at(&self, offset: usize, buf: &mut [u8]) -> usize { + if offset >= self.fb_info.screen_size { + return 0; } + let count = buf.len().min(self.fb_info.screen_size - offset); + let data = unsafe { + core::slice::from_raw_parts((self.buf.base_addr + offset) as *const u8, count) + }; + buf[..count].copy_from_slice(&data); + count } - /// Fill buffer `[offset .. offset + size]` with `pixel`. - /// `offset` and `size` must be aligned with `usize`. - pub fn fill(&mut self, offset: usize, size: usize, pixel: u32) { + /// Write buffer data starts at `offset` to `buf`. + pub fn write_at(&mut self, offset: usize, buf: &[u8]) -> usize { + if offset > self.fb_info.screen_size { + return 0; + } + let count = buf.len().min(self.fb_info.screen_size - offset); + let data = unsafe { + core::slice::from_raw_parts_mut((self.buf.base_addr + offset) as *mut u8, count) + }; + data.copy_from_slice(&buf[..count]); + count + } + + /// Copy buffer `[src_off .. src_off + count]` to `[dst_off .. dst_off + count]`. + pub fn copy(&mut self, dst_off: usize, src_off: usize, count: usize) { + let size = self.fb_info.screen_size; + if src_off >= size || dst_off >= size { + return; + } + let count = count.min(size - src_off).min(size - dst_off); + unsafe { + let buf = core::slice::from_raw_parts_mut(self.buf.base_addr as *mut u8, size); + buf.copy_within(src_off..src_off + count, dst_off) + }; + } + + /// Fill buffer `[offset .. offset + count]` with `pixel`. + /// `offset` and `count` must be aligned with `usize`. + pub fn fill(&mut self, offset: usize, count: usize, pixel: u32) { const USIZE: usize = core::mem::size_of::(); let mut value: usize = 0; let depth = self.fb_info.depth as usize; @@ -222,8 +247,13 @@ impl Framebuffer { value += pixel as usize & mask; } + let offset = offset & !(USIZE - 1); + if offset >= self.fb_info.screen_size { + return; + } + let count = (count & !(USIZE - 1)).min(self.fb_info.screen_size - offset); let mut start = self.base_addr() + offset; - let end = start + size; + let end = start + count; while start < end { unsafe { *(start as *mut usize) = value } start += USIZE; @@ -280,7 +310,7 @@ impl ColorEncode for Rgb888 { } } -pub static FRAME_BUFFER: Mutex> = Mutex::new(None); +pub static FRAME_BUFFER: RwLock> = RwLock::new(None); /// Initialize framebuffer /// @@ -288,5 +318,5 @@ pub static FRAME_BUFFER: Mutex> = Mutex::new(None); pub fn init(info: FramebufferInfo) { let fb = Framebuffer::new(info); info!("framebuffer: init end\n{:#x?}", fb); - *FRAME_BUFFER.lock() = Some(fb); + *FRAME_BUFFER.write() = Some(fb); } diff --git a/kernel/src/fs/fbdev.rs b/kernel/src/fs/fbdev.rs index 7ad5be8c..f1c8430c 100755 --- a/kernel/src/fs/fbdev.rs +++ b/kernel/src/fs/fbdev.rs @@ -15,19 +15,8 @@ impl INode for Fbdev { offset, buf.len() ); - if let Some(mut frame_buffer) = FRAME_BUFFER.lock().as_ref() { - let mut count = buf.len(); - if offset > frame_buffer.framebuffer_size() { - return Ok(0); - } - if offset + count > frame_buffer.framebuffer_size() { - count = frame_buffer.framebuffer_size() - offset; - } - let frame_buffer_data = unsafe { - core::slice::from_raw_parts((frame_buffer.base_addr() + offset) as *const u8, count) - }; - buf[..count].copy_from_slice(&frame_buffer_data); - Ok(count) + if let Some(fb) = FRAME_BUFFER.read().as_ref() { + Ok(fb.read_at(offset, buf)) } else { Err(FsError::NoDevice) } @@ -38,21 +27,8 @@ impl INode for Fbdev { offset, buf.len() ); - if let Some(mut frame_buffer) = FRAME_BUFFER.lock().as_mut() { - let mut count = buf.len(); - if offset > frame_buffer.framebuffer_size() { - return Ok(0); - } - if offset + count > frame_buffer.framebuffer_size() { - count = frame_buffer.framebuffer_size() - offset; - } - let frame_buffer_data = unsafe { - core::slice::from_raw_parts_mut( - (frame_buffer.base_addr() + offset) as *mut u8, - count, - ) - }; - frame_buffer_data.copy_from_slice(&buf[..count]); + if let Some(mut fb) = FRAME_BUFFER.write().as_mut() { + let count = fb.write_at(offset, buf); if count == buf.len() { Ok(count) } else { @@ -95,14 +71,14 @@ impl INode for Fbdev { match cmd { FBIOGET_FSCREENINFO => { let fb_fix_info = unsafe { &mut *(data as *mut FbFixScreeninfo) }; - if let Some(fb) = FRAME_BUFFER.lock().as_ref() { + if let Some(fb) = FRAME_BUFFER.read().as_ref() { fb_fix_info.fill_from(&fb.fb_info); } Ok(()) } FBIOGET_VSCREENINFO => { let fb_var_info = unsafe { &mut *(data as *mut FbVarScreeninfo) }; - if let Some(fb) = FRAME_BUFFER.lock().as_ref() { + if let Some(fb) = FRAME_BUFFER.read().as_ref() { fb_var_info.fill_from(&fb.fb_info); } Ok(()) @@ -118,7 +94,7 @@ impl INode for Fbdev { #[cfg(target_arch = "aarch64")] let attr = attr.mmio(crate::arch::paging::MMIOType::NormalNonCacheable as u8); - if let Some(fb) = FRAME_BUFFER.lock().as_ref() { + if let Some(fb) = FRAME_BUFFER.read().as_ref() { if area.offset + area.end_vaddr - area.start_vaddr > fb.framebuffer_size() { return Err(FsError::NoDeviceSpace); } From 822f3010c8f9c1229299359df9640c76fee79b5f Mon Sep 17 00:00:00 2001 From: equation314 Date: Sat, 4 Apr 2020 17:26:11 +0800 Subject: [PATCH 4/8] Move device file system codes into src/fs/devfs --- kernel/src/fs/{ => devfs}/fbdev.rs | 2 ++ kernel/src/fs/devfs/mod.rs | 9 +++++++++ kernel/src/fs/{ => devfs}/random.rs | 2 +- kernel/src/fs/{ => devfs}/stdio.rs | 2 +- kernel/src/fs/mod.rs | 15 ++++++++------- 5 files changed, 21 insertions(+), 9 deletions(-) rename kernel/src/fs/{ => devfs}/fbdev.rs (99%) create mode 100644 kernel/src/fs/devfs/mod.rs rename kernel/src/fs/{ => devfs}/random.rs (98%) rename kernel/src/fs/{ => devfs}/stdio.rs (99%) diff --git a/kernel/src/fs/fbdev.rs b/kernel/src/fs/devfs/fbdev.rs similarity index 99% rename from kernel/src/fs/fbdev.rs rename to kernel/src/fs/devfs/fbdev.rs index f1c8430c..89def8ef 100755 --- a/kernel/src/fs/fbdev.rs +++ b/kernel/src/fs/devfs/fbdev.rs @@ -1,3 +1,5 @@ +//! Implement INode for framebuffer + use crate::drivers::gpu::fb::{ColorFormat, FramebufferInfo, FRAME_BUFFER}; use crate::syscall::MmapProt; use core::any::Any; diff --git a/kernel/src/fs/devfs/mod.rs b/kernel/src/fs/devfs/mod.rs new file mode 100644 index 00000000..38729d42 --- /dev/null +++ b/kernel/src/fs/devfs/mod.rs @@ -0,0 +1,9 @@ +//! Device file system mounted at /dev + +mod fbdev; +mod random; +mod stdio; + +pub use fbdev::*; +pub use random::*; +pub use stdio::*; diff --git a/kernel/src/fs/random.rs b/kernel/src/fs/devfs/random.rs similarity index 98% rename from kernel/src/fs/random.rs rename to kernel/src/fs/devfs/random.rs index 065b7931..4e247e74 100644 --- a/kernel/src/fs/random.rs +++ b/kernel/src/fs/devfs/random.rs @@ -8,7 +8,7 @@ use rcore_fs::vfs::*; use crate::sync::Condvar; use crate::sync::SpinNoIrqLock as Mutex; -pub struct RandomINodeData { +struct RandomINodeData { seed: u32, } diff --git a/kernel/src/fs/stdio.rs b/kernel/src/fs/devfs/stdio.rs similarity index 99% rename from kernel/src/fs/stdio.rs rename to kernel/src/fs/devfs/stdio.rs index 0d40c56f..55e44f4f 100644 --- a/kernel/src/fs/stdio.rs +++ b/kernel/src/fs/devfs/stdio.rs @@ -5,7 +5,7 @@ use core::any::Any; use rcore_fs::vfs::*; -use super::ioctl::*; +use crate::fs::ioctl::*; use crate::process::Process; use crate::sync::Condvar; use crate::sync::SpinNoIrqLock as Mutex; diff --git a/kernel/src/fs/mod.rs b/kernel/src/fs/mod.rs index 951572e7..d9224839 100644 --- a/kernel/src/fs/mod.rs +++ b/kernel/src/fs/mod.rs @@ -2,30 +2,31 @@ use alloc::{sync::Arc, vec::Vec}; use rcore_fs::dev::block_cache::BlockCache; use rcore_fs::vfs::*; -use rcore_fs_devfs::{special::*, DevFS}; +use rcore_fs_devfs::{ + special::{NullINode, ZeroINode}, + DevFS, +}; use rcore_fs_mountfs::MountFS; use rcore_fs_ramfs::RamFS; use rcore_fs_sfs::SimpleFileSystem; +use self::devfs::{Fbdev, RandomINode}; use crate::drivers::BlockDriver; +pub use self::devfs::{STDIN, STDOUT}; pub use self::file::*; pub use self::file_like::*; pub use self::pipe::Pipe; pub use self::pseudo::*; -pub use self::random::*; -pub use self::stdio::{STDIN, STDOUT}; +mod devfs; mod device; pub mod epoll; -pub mod fbdev; mod file; mod file_like; mod ioctl; mod pipe; mod pseudo; -mod random; -mod stdio; // Hard link user programs #[cfg(feature = "link_user")] @@ -85,7 +86,7 @@ lazy_static! { devfs.add("zero", Arc::new(ZeroINode::default())).expect("failed to mknod /dev/zero"); devfs.add("random", Arc::new(RandomINode::new(false))).expect("failed to mknod /dev/random"); devfs.add("urandom", Arc::new(RandomINode::new(true))).expect("failed to mknod /dev/urandom"); - devfs.add("fb0", Arc::new(fbdev::Fbdev::default())).expect("failed to mknod /dev/fb0"); + devfs.add("fb0", Arc::new(Fbdev::default())).expect("failed to mknod /dev/fb0"); // mount DevFS at /dev let dev = root.find(true, "dev").unwrap_or_else(|_| { From 332830b7c497fc4402d5f9a195b498fa02dc2923 Mon Sep 17 00:00:00 2001 From: equation314 Date: Sat, 4 Apr 2020 23:21:19 +0800 Subject: [PATCH 5/8] Update rcore-fs version --- kernel/Cargo.lock | 38 +++++++++++++++++++------------------- kernel/Cargo.toml | 10 +++++----- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/kernel/Cargo.lock b/kernel/Cargo.lock index 775ff6e2..98028f8c 100644 --- a/kernel/Cargo.lock +++ b/kernel/Cargo.lock @@ -362,11 +362,11 @@ dependencies = [ "raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rboot 0.1.2", "rcore-console 0.1.0 (git+https://github.com/rcore-os/rcore-console?rev=b7bacf9)", - "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", - "rcore-fs-devfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", - "rcore-fs-mountfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", - "rcore-fs-ramfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", - "rcore-fs-sfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", + "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", + "rcore-fs-devfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", + "rcore-fs-mountfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", + "rcore-fs-ramfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", + "rcore-fs-sfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", "rcore-memory 0.1.0", "rcore-thread 0.1.0 (git+https://github.com/rcore-os/rcore-thread?rev=d727949b)", "riscv 0.5.0 (git+https://github.com/rcore-os/riscv)", @@ -392,7 +392,7 @@ dependencies = [ [[package]] name = "rcore-fs" version = "0.1.0" -source = "git+https://github.com/rcore-os/rcore-fs?rev=e17b27b#e17b27b3d257f23ed8ba43d902c909d23245a008" +source = "git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac#7f5eeac8b77f6bab11f6f2ce631a194bee658555" dependencies = [ "filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -402,42 +402,42 @@ dependencies = [ [[package]] name = "rcore-fs-devfs" version = "0.1.0" -source = "git+https://github.com/rcore-os/rcore-fs?rev=e17b27b#e17b27b3d257f23ed8ba43d902c909d23245a008" +source = "git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac#7f5eeac8b77f6bab11f6f2ce631a194bee658555" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", + "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rcore-fs-mountfs" version = "0.1.0" -source = "git+https://github.com/rcore-os/rcore-fs?rev=e17b27b#e17b27b3d257f23ed8ba43d902c909d23245a008" +source = "git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac#7f5eeac8b77f6bab11f6f2ce631a194bee658555" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", + "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rcore-fs-ramfs" version = "0.1.0" -source = "git+https://github.com/rcore-os/rcore-fs?rev=e17b27b#e17b27b3d257f23ed8ba43d902c909d23245a008" +source = "git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac#7f5eeac8b77f6bab11f6f2ce631a194bee658555" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", + "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rcore-fs-sfs" version = "0.1.0" -source = "git+https://github.com/rcore-os/rcore-fs?rev=e17b27b#e17b27b3d257f23ed8ba43d902c909d23245a008" +source = "git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac#7f5eeac8b77f6bab11f6f2ce631a194bee658555" dependencies = [ "bitvec 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)", + "rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -738,11 +738,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum raw-cpuid 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "30a9d219c32c9132f7be513c18be77c9881c7107d2ab5569d205a6a0f0e6dc7d" "checksum raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" "checksum rcore-console 0.1.0 (git+https://github.com/rcore-os/rcore-console?rev=b7bacf9)" = "" -"checksum rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)" = "" -"checksum rcore-fs-devfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)" = "" -"checksum rcore-fs-mountfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)" = "" -"checksum rcore-fs-ramfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)" = "" -"checksum rcore-fs-sfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=e17b27b)" = "" +"checksum rcore-fs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)" = "" +"checksum rcore-fs-devfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)" = "" +"checksum rcore-fs-mountfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)" = "" +"checksum rcore-fs-ramfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)" = "" +"checksum rcore-fs-sfs 0.1.0 (git+https://github.com/rcore-os/rcore-fs?rev=7f5eeac)" = "" "checksum rcore-thread 0.1.0 (git+https://github.com/rcore-os/rcore-thread?rev=d727949b)" = "" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum register 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e10f31b6d2299e5620986ad9fcdd66463e125ad72af4f403f9aedf7592d5ccdb" diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 1f220f82..7163b8e1 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -66,11 +66,11 @@ bitmap-allocator = { git = "https://github.com/rcore-os/bitmap-allocator" } rcore-console = { git = "https://github.com/rcore-os/rcore-console", rev = "b7bacf9", default-features = false } rcore-memory = { path = "../crate/memory" } rcore-thread = { git = "https://github.com/rcore-os/rcore-thread", rev = "d727949b" } -rcore-fs = { git = "https://github.com/rcore-os/rcore-fs", rev = "e17b27b" } -rcore-fs-sfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "e17b27b" } -rcore-fs-ramfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "e17b27b" } -rcore-fs-mountfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "e17b27b" } -rcore-fs-devfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "e17b27b" } +rcore-fs = { git = "https://github.com/rcore-os/rcore-fs", rev = "7f5eeac" } +rcore-fs-sfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "7f5eeac" } +rcore-fs-ramfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "7f5eeac" } +rcore-fs-mountfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "7f5eeac" } +rcore-fs-devfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "7f5eeac" } compression = { version = "0.1.4", default-features = false, features = ["gzip"] } From 333282ffcb1d45ed77f094ec77886fe96d7a3afa Mon Sep 17 00:00:00 2001 From: equation314 Date: Sun, 5 Apr 2020 00:18:44 +0800 Subject: [PATCH 6/8] Bump rcore-user version --- user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user b/user index c5387635..1bdaf05b 160000 --- a/user +++ b/user @@ -1 +1 @@ -Subproject commit c53876357b500f34fb2d75bb1816e824366cce6e +Subproject commit 1bdaf05bb37bd8f38063c5bc935906bf640b07b7 From c7f64461d0229095af978385d0bf9d21e6ff7e82 Mon Sep 17 00:00:00 2001 From: equation314 Date: Sun, 5 Apr 2020 21:35:07 +0800 Subject: [PATCH 7/8] Bump rboot version --- kernel/Cargo.lock | 12 +++++++++++- rboot | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel/Cargo.lock b/kernel/Cargo.lock index 98028f8c..e2972615 100644 --- a/kernel/Cargo.lock +++ b/kernel/Cargo.lock @@ -331,7 +331,7 @@ version = "0.1.2" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "uefi 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "x86_64 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", + "x86_64 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", "xmas-elf 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -681,6 +681,15 @@ dependencies = [ "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "x86_64" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "xmas-elf" version = "0.7.0" @@ -774,5 +783,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum x86 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f21eecbd666e3a8edbf0b26d36f270f7a613d8986ca0eafb8205e324f7336dab" "checksum x86_64 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1f27d9168654aee1b0c1b73746caeb4aa33248f8b8c8f6e100e697fcc2a794b2" "checksum x86_64 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5d9e3e26fcb51976eafa310e8f2b7a5a83ae8c185443efe50cbc6534a4fffa0d" +"checksum x86_64 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4206b60c9f99766329b66962aa8ddc01df6c7edd02edc046b7a69d5df9fcdbcf" "checksum xmas-elf 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e74de9a366f6ab8c405fa6b371d9ac24943921fa14b3d64afcb202065c405f11" "checksum zero 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f1bc8a6b2005884962297587045002d8cfb8dcec9db332f4ca216ddc5de82c5" diff --git a/rboot b/rboot index 88b882bd..33a2d215 160000 --- a/rboot +++ b/rboot @@ -1 +1 @@ -Subproject commit 88b882bd65eb7d7604a87634dafd63f96ae1bf2f +Subproject commit 33a2d215957b704a26dab52484d75d47dbb49bdb From d10997f90fb11e507658213533c33f33967055fa Mon Sep 17 00:00:00 2001 From: equation314 Date: Sun, 5 Apr 2020 21:54:05 +0800 Subject: [PATCH 8/8] Update Rust nightly to 2020-03-23. --- .github/workflows/main.yml | 2 +- kernel/Cargo.lock | 18 +++++++++++++++--- rust-toolchain | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1be6baa5..ebdba0fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly-2020-01-17 + toolchain: nightly-2020-03-23 components: rust-src, llvm-tools-preview - name: Cache QEMU diff --git a/kernel/Cargo.lock b/kernel/Cargo.lock index e2972615..09cd418a 100644 --- a/kernel/Cargo.lock +++ b/kernel/Cargo.lock @@ -107,9 +107,10 @@ dependencies = [ [[package]] name = "buddy_system_allocator" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -348,7 +349,7 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitmap-allocator 0.1.0 (git+https://github.com/rcore-os/bitmap-allocator)", "bitvec 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", - "buddy_system_allocator 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "buddy_system_allocator 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "compression 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "device_tree 1.0.3 (git+https://github.com/rcore-os/device_tree-rs)", @@ -496,6 +497,16 @@ dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustversion" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "semver" version = "0.9.0" @@ -717,7 +728,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum bitmap-allocator 0.1.0 (git+https://github.com/rcore-os/bitmap-allocator)" = "" "checksum bitvec 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1fe4300c1d7a9ea6f3e3f39c10b39862bb79e1175c0572b6b49539a30e5562f5" -"checksum buddy_system_allocator 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "59da15ef556589ee78370281d75b67f2d69ed26465ec0e0f3961e2021502426f" +"checksum buddy_system_allocator 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "09072aa89a810228c822e132e4639ff17bab014ba5b2dce5270a6331ff1963ca" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" "checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" @@ -758,6 +769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum riscv 0.5.0 (git+https://github.com/rcore-os/riscv)" = "" "checksum rlibc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum smoltcp 0.5.0 (git+https://github.com/rcore-os/smoltcp?rev=5bd87c7c)" = "" diff --git a/rust-toolchain b/rust-toolchain index 17841400..d6c11b15 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-01-17 +nightly-2020-03-23