Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    whereas the counterpart without the softflot in the same directory does
    Vincent Hou
    @vincenthouyi
    i see. the softfloat one contains features: "+strict-align,-neon,-fp-armv8".to_string(),. which disables fp ops
    Andre Richter
    @andre-richter
    But it seems you have those flags covered in spur custom target already πŸ€”
    Vincent Hou
    @vincenthouyi
    yes
    Philipp Oppermann
    @phil-opp

    @cormac-obrien

    Hi all! I'm trying to follow the blog-os tutorial without using bootimage, since it seems like v3 is going to stop using it. Things work well until I try to int3 , which causes a page fault because the GDT isn't mapped (see the rust-osdev/bootloader#153). I tried to work around this by setting up my own GDT that lives in the kernel image, loading that, setting the segment registers, etc, but now when I int3 I get a GPF with the error code pointing to my code segment. Everything in that segment looks right to me: CS =0008 0000000000000000 ffffffff 00af9b00 DPL=0 CS64 [-RA] . The only thing I can think of is that GDTR appears to have the virtual address of the GDT. Am I missing an obvious fix?

    Have you reloaded the cs register after loading you GDT?

    Robbie
    @robbie01

    hello! i found this bare-bones example using the limine bootloader and it gave me inspiration to try working on my own. i was able to get started on it, however i quickly became dissatisfied with the stivale crate so i set out to reimplement it on my own. after hours of banging away at data structures, i came up with this, though i feel like i could make a lot better use of lifetimes. after hacking away at compile error after compile error, i got it integrated with my proto-kernel, only to get greeted with this final boss of an error message.

    error[E0080]: it is undefined behavior to use this value
      --> src/main.rs:16:1
       |
    16 | static STIVALE_HDR: Header = Header::new(Some(entry_porzint), &STACK[4095] as *const u8 as *const (), HeaderFlags::empty(), &TERMINAL_TAG as *const header::Terminal);
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered pointer to alloc11 at .entry_point, but expected initialized plain (non-pointer) bytes
       |
       = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
       = note: the raw bytes of the constant (size: 32, align: 1) {
                   0x00 β”‚ ╾───────alloc11───────╼ ╾────alloc0+0xfff─────╼ β”‚ ╾──────╼╾──────╼
                   0x10 β”‚ 00 00 00 00 00 00 00 00 ╾───────alloc1────────╼ β”‚ ........╾──────╼
               }

    this is seriously starting to remind me of that time i tried reading deleuze. anyone have any pointers?

    here's the spec for stivale2. there's one erratum i've identified in the markdown for which i've already put in a PR for, but the rest seems pretty solid.
    https://github.com/stivale/stivale/blob/master/STIVALE2.md
    https://github.com/stivale/stivale/blob/master/stivale2.h
    Robbie
    @robbie01
    i'm having a feeling that i'm actually clean; when i change that Some to a None, it zeroes out the first eight bytes (which is intended) but the chart remains otherwise the same. it also complains about alloc0+0xfff at .stack instead of alloc11 at .entry_point. am i forgetting an attribute?
    Ben
    @Ben-PH
    has anyone played with the robigalia project within the last year or two?
    julianst
    @js:ukvly.org
    [m]
    is there any Nix user in here?
    I wonder whether anyone already has experiences building no_std and exotic targets in Nix?
    and the workarounds are currently sad :(
    mjmdellpython
    @mjmdellpython
    Hi, I am still new in Rust. Really this language is interesting. I am happy to join:)
    Ben
    @Ben-PH
    @mjmdellpython lovely to have you here :D
    Are you experienced with low-level in general, or are you exploring a new domain alongside the new language?
    Philipp Oppermann
    @phil-opp
    only to get greeted with this final boss of an error message.
    @robbie01 Oh wow, that's an ugly one! It might be worth it to ask about this in some other channels, e.g. on users.rust-lang.org or the rust-lang discord channels (official or inofficial). There are typically people with lots of compiler experience there.
    Ben
    @Ben-PH
    I made an ascii-flow diagram of aarch64 page table structure. Feel free to use it
    https://pastebin.com/R1dbA9rM
    @phil-opp If you'd like to include it in your blog-os series, let me know and I can change it to suite.
    Andre Richter
    @andre-richter
    Just curious, where did you take the terminology from? PgUpDir etc? Sounds a bit like x86? In the ARM manuals, these are usually conveniently just called Level 3 Table, Level 2 Table, etc.
    Vincent Hou
    @vincenthouyi
    I think this is from Linux kernel? Just instead of PgUpDir,PgDir,PgTable, Linux use pud, pd, pt. And VSpace usually refers to the whole virtual address space instead of the top level page table
    Ben
    @Ben-PH
    PageUpperDirectory, PageDirectory, PageTable
    seL4 refers to PageGlobalDirectory for the top level.
    and PGD <=> VSpace in that domain
    Andre Richter
    @andre-richter
    Got it. What I wanted to convey is that those terms may not be idiomatic AArch64 speak in terms of what you find in their manuals and guides
    Ben
    @Ben-PH
    I get you now.
    if you look at the section 7.1.4.4 and 7.1.3.2 you1ll see the documentation I was going by. I agree that it's not too idiomatic specifically to aarch64. I'll keep note of that when I'm describing it in the future.
    Andre Richter
    @andre-richter
    Yeah, often its for reasons of organic growth. For example, Linux started out on x86, so the source adopted the x86 terminology I think. So later when other architectures where added, they (had to) reuse it
    L4 might have started on x86 as well?
    Ben
    @Ben-PH
    possibly.
    Vincent Hou
    @vincenthouyi
    The pgd, pud, pd, pt terms are at least used by Linux kernel. seL4 adopted a lot of terms and concepts from Linux. The x86-64 seL4 use another system of terms (pml4, pdpt, pd, pt) for levels of page tables.
    Ben
    @Ben-PH
    Been spending the last few days putting together what seL4 api documentation might look like if the api was written in rust based on the seL4 manual. Just now happy with it being public
    Vincent Hou
    @vincenthouyi
    cool! you really put a lot of effor on seL4. are you a student from UNSW?
    Ben
    @Ben-PH
    I spent some time there. Never graduated though. Life.. finds a way (to fuck you over)
    Yeah. I really like what rust did to the domain that C occupies. I see seL4 as potentially doing the same for OS
    Vincent Hou
    @vincenthouyi
    ah. Sorry to hear that. But we are alumni then!
    Ben
    @Ben-PH
    Cool. Were we there together at all?
    Vincent Hou
    @vincenthouyi
    2015-2017. I did my master there
    Ben
    @Ben-PH
    I arrived in 2017
    your masters have anything to do with sel4?
    Vincent Hou
    @vincenthouyi
    I did my master thesis in sel4 group. Didn’t turn out to be very well though haha
    Hiroki Tokunaga
    @toku-sa-n
    Hi. I'm trying to host my qemu_print crate under this Rust OSDev team, but when I try to do it, GitHub asks me to specify a group. When I did for the xhci crate, I created a new group, but do I have to create a group each time?
    Philipp Oppermann
    @phil-opp
    @toku-sa-n I think you can just select no group and we can create one later when we need to give multiple people write access.
    Philipp Oppermann
    @phil-opp
    @Ben-PH Nice ascii art :). Thanks for the offer to include it in the blog, but it's probably better to stay focused on the x86_64 page table format. I like the format though, maybe I redo my page table diagrams in a similar style for the third edition of the blog.
    EWE-2
    @EWE-2
    Hi. I'm new member of this group. Where can i find code of conduct, rules ...