Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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 ...
    Philipp Schuster
    @phip1611

    Hi, is anyone experienced with multiboot2 and the "EFI amd64 machine state with boot services enabled"-state (section 3.5 of spec)? This sounds relatively simple, but in my case eax (x86 register) doesn't contain the magic value and somehow handoff to my startup assembler code (which will eventually call my Rust code) doesn't work. I have a mb2 header and the two relevant mb2 tags are present, all correctly aligned. I don't know how to trouble-shoot this. I also posted this on stackoverflow. One can see my nasm definition of the mb2 header there. I'm glad for any help! https://stackoverflow.com/questions/67986406/

    The Rust tool "bootinfo" also shows me the correct header. So I'm wondering: Am I missing something? Do I need more tags?

    Philipp Schuster
    @phip1611
    PS: If I use the naked mb2 header (no tags at all), it works perfectly fine in my setup to be in the 32-bit protected mode and to execute code, but I want to come into the "EFI amd64 machine with boot services enabled"-state.
    esposm
    @samuele_esposito:matrix.org
    [m]
    Hey, I'm currently trying to write an OS for UEFI, and I'm having trouble with the uefi crate. Specifically, when I try to map a given address using AllocateType::Address(/* address here */), the call errors with NOT_FOUND. I'm trying to implement acpi::AcpiHandler, which is giving me the physical address I'm trying to map. What could I be missing?
    This is the code that's failing:
    impl acpi::AcpiHandler for MyAcpiHandler<'_> {
        unsafe fn map_physical_region<T>(&self, physical_address: usize, size: usize) -> acpi::PhysicalMapping<Self, T> {
            boot_println!("Mapping physical region at addr 0x{:x}", physical_address);
            let res = self.0.allocate_pages(
                AllocateType::Address(physical_address),
                MemoryType::LOADER_DATA,
                size / 4096 + 1,
            ).unwrap_success();
    
            acpi::PhysicalMapping {
                physical_start: physical_address,
                virtual_start: NonNull::new(res as *mut T).unwrap(),
                region_length: size,
                mapped_length: size / 4096 + 1,
                handler: *self,
            }
        }
    
        fn unmap_physical_region<T>(&self, _: &acpi::PhysicalMapping<Self, T>) {
            todo!()
        }
    }
    Isaac Woods
    @IsaacWoods
    @samuele_esposito:matrix.org all of physical memory is identity mapped in UEFI, so you should just be able to return a mapping with the physical address also as the virtual address
    The allocation is probably failing because the addresses are marked as EfiACPIReclaimMemory, which it's refusing to allocate
    Anhad Singh
    @Andy-Python-Programmer
    image.png
    @phil-opp the rust-os-gdb no-longer compiles for some reason
    I tried to rebase to master as if it was an old GCC version and the rebase was full of conflicts
    gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    xitan
    @xitan:matrix.org
    [m]
    Hi there, has anyone an idea why rustc includes debug symbols (for a debug build as intended) for target x86_64-unknown-uefi on nightly October 2020 but not on latest nightly? (Specifying debug and split-debuginfo in my cargo profile does not help either)
    xitan
    @xitan:matrix.org
    [m]

    :point_up: Edit: Hi there, has anyone an idea why rustc includes debug symbols (for a debug build as intended) for target x86_64-unknown-uefi on nightly October 2020 but not on latest nightly? (Specifying debug and split-debuginfo in my cargo profile does not help either)

    Update: rust-lang/rust#87157

    ActuallyExeon
    @actuallyexeon:matrix.org
    [m]
    Does anybody know how to use the framebuffer? I couldn't find any documentation on it other then docs.rs.
    xitan
    @xitan:matrix.org
    [m]

    :point_up: Edit: Hi there, has anyone an idea why rustc includes debug symbols (for a debug build as intended) for target x86_64-unknown-uefi on nightly October 2020 but not on latest nightly? (Specifying debug and split-debuginfo in my cargo profile does not help either)

    Issue and workaround: rust-lang/rust#87157

    Ben
    @Ben-PH
    I'm experimenting with building an async executuon model for my OS, however I feel like I'm code-monkeying it. I was hoping to have a chat with someone so that I can consolidate what I currently know, and make my understandings a bit less superficial.
    Harald Hoyer
    @haraldh
    Just to let you know: -Zbuild-std-features=compiler-builtins-mem saved me from getting errors about memcpy and stuff while doing -Z build-std=core
    Jonathan
    @jboi:jboi.nl
    [m]
    what kind of support is there right now for poking at virtualization from the ground up?

    i'm currently thinking big, and want to take a crack at building an open-source ESXi, almost, a type-1 hypervisor

    maybe not to get somewhere, but i want to see how much is possible right now, and how much work is left

    Jonathan
    @jboi:jboi.nl
    [m]
    also, shouldnt the arm64 crate be taken by osdev? it seems to be unclaimed 👀
    Andre Richter
    @andre-richter
    1 reply
    Jonathan
    @jboi:jboi.nl
    [m]
    or well, serve complements to the likes of kvm and such
    Visual
    @VisualDevelopment
    Hello, I've come here seeking for help with an issue I'm encountering while developing my modern hobby OS. I'm new to Rust, but I know plenty of low-level development. I'm really bad at debugging issues, though. I'm getting a general protection exception when setting the stack, and an overflow when not. Here is the link to a gist with the exception info and relevant code for my UEFI bootloader and my "hello world" kernel
    1 reply
    Rune Tynan
    @CraftSpider
    Playing with rewriting the storage API POC into a more 'release ready' library, and just finished my first static-cell based storage. This seems like it could be pretty cool, providing a static StorageCell<[usize; 16]> or whatever, then claiming it when you want Vec or Box or whatever. For now it's only one box per StorageCell, but I might be able to make it support just treating it like an allocation heap. Which would be Pretty Nifty.
    Ben
    @Ben-PH

    For my project, I'm at the point of having to think about a file system:

    Right now, my read/write system call impl does a naive read/write. I'd like to be able to handle open(), close(), read(), write() for my terminal io. That is, pass file-descriptors to user-land, and for printf to write to stdout, etc.

    I have a network file system library available, which I will later be using as my first file system (later, I can start thinking of device storage).

    For now, I'm wondering how to put together my vfs so that a) I can treat my io device as a file and b) later be able to use the nfs library to provide persistant storage.

    Linuxxx
    @Exiled1
    Omg, thank gods for the search feature! I spent an hour or two trying to solve the bootimage issue using the bootloader 10th version, so I can make an executable using the 9th version, but how is a bootable kernel made nowadays? I couldn't quite figure that out as I'm only on the 2nd OS post so far
    Arun Kumar
    @arunkumar413
    Hi All, I just joined this chat. I Appreciate all your work.
    rybot666
    @rybot666
    welcome, and thank you
    Ananta Kusuma P
    @ananta96:matrix.org
    [m]
    Hello nice to meet you all. I'm joined here because interested about OSDev using rust using phil opperman tutorial. I've project but not finished.
    Chris Drzewiecki
    @cdrzewiecki_gitlab

    Hello! Finally joined the chat to ask a question, hopefully someone can help. Does anyone have a suggestion on a solid way to detect the size of your kernel? I'm currently using lines in my linker script (e.g. at the end I have _kernel_end = .), but it's proving unreliable. I just encountered a bug in my code where the end of the kernel was reported by the linker as 0x363000, but I saw the processor executing an instruction at 0x36600 and my code falsely concluded that the RIP address was outside the kernel.

    Honestly no idea why it's happening - my best guess is that this is a side effect of lazy_static, since I'm guessing that data doesn't exist in the binary at compile time? Still, whatever the cause I really would like to know how I can accurately detect the size of my kernel. Right now I'm afraid I'll start overwriting memory that contains the kernel without knowing I'm doing so.

    The Iris System
    @iris:smol.systems
    [m]
    The memory used by lazy_static for an object is reserved in the binary's .data section as would be normal for any other static declaration, it's just not actually initialized until the lazy_static is dereferenced (or lazy_static::initialize is called on it) so I don't think that would be the problem
    I can't remember if the bootloader crate passes the ELF section headers through in the same way a Multiboot-compliant bootloader would (and if it doesn't, that's a feature request I might make) but in my things where I'm using Multiboot, I rely on that for kernel size detection
    Chris Drzewiecki
    @cdrzewiecki_gitlab
    I am using grub and not the bootloader crate, so ELF section headers might be the way to go for me as well. Thanks for the suggestion! I do still wonder why my symbols from the linker aren't working though :/