Giter Site home page Giter Site logo

dtb-walker's Introduction

你好

近期主要关注 Rust 和 RISCV。也许这些开源项目能够帮得上忙:

  • 下列库不需要 std 和 alloc,零开销抽象,因此可用于几乎任何软件

  • 其他项目

    Readme Card

    这个项目实现适用于 qemu virt 虚拟设备的特权运行环境(SEE)。SEE 向特权软件(Supervisor)提供由 RISCV 标准定义的特权态二进制接口(SBI:Supervisor Binary Interface)。


Github Stats Most Used Languages

这个语言统计没什么意义,因为我大部分提交在组织里

dtb-walker's People

Contributors

renovate[bot] avatar ydrmaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

luojia65

dtb-walker's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/workflow.yml
  • actions/checkout v3
  • actions-rs/toolchain v1
  • actions-rs/cargo v1
  • actions-rs/install v0.1
  • actions-rs/install v0.1
  • actions-rs/cargo v1
  • github/codeql-action v2

  • Check this box to trigger a request for Renovate to run again on this repository

带上下文遍历

当前版本保证遍历是无开销的,但也无法携带上下文。使用时得每次通过当前的 path 判断所在的节点。

应该可以实现一个带上下文的遍历,根据节点进入或退出自动在栈上创建上下文对象。

如果实现这个效果将极大简化遍历的代码。

这个功能将包含在 0.2.0 版本中。

Panic in FdtHeader::verify() when using with QEMU and RISC-V virt machine

I get a panic in FdtHeader::verify() when using with QEMU and RISC-V virt machine:

called 'Result::unwrap()' on an 'Err' value: LastCompVersion

which occurs at line 60 while checking the header's minimum compatibility version. Note that this is the standard QEMU FDT for the RISC-V virt machine.

Version info:

  • dtb-walker 0.1.0
  • QEMU emulator version 6.0.0 (Debian 1:6.0+dfsg-2expubuntu1.2)

I run QEMU like this:

qemu-system-riscv64 -M virt -m 256M -nographic \
  -bios ../opensbi/build/platform/generic/firmware/fw_jump.elf \
  -kernel <path/to/my/binary>

My code looks like this:

pub fn dump(fdt: &*const u8) {
  use dtb_walker::{Dtb, DtbObj, WalkOperation};
  let dtb = unsafe { Dtb::from_raw_parts(*fdt) }.unwrap();
  ...

If I change it to:

pub fn dump(fdt: &*const u8) {
  use dtb_walker::{Dtb, DtbObj, WalkOperation};
  let dtb = unsafe { Dtb::from_raw_parts_unchecked(*fdt) };
  ...

It seems to work, since I get a dump of the FDT. Is it possible that this library is compatible with FDT versions older than 16? Maybe you can reduce the number?

If this library is compatible only with 16 or later, what parts don't work with older versions?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.