13,822 questions
-2
votes
1
answer
63
views
idt_64 definiton crashes the os [closed]
im following a udemy course on making an operating system from scratch, but i have run into a very bizarre error:
Makefile:
DISK = os.img
KERNEL = kernel.bin
BOOTSECTOR = bootsector
NASM = nasm
QEMU =...
0
votes
0
answers
25
views
warning: word data exceeds bounds [-w+number-overflow] [duplicate]
I'm trying to start building an operating system from scratch but I don't know why I'm getting this warning on this code:
[BITS 16]
[ORG 0x7c00]
start:
mov ax, 0
mov ds, ax
mov es, ax
...
0
votes
1
answer
81
views
System call transition to system call table
When a system call is invoked by a user program, a software interrupt (trap) is raised, control first passes to the fixed location of the interrupt vector (IR) which contains the ISR associated with ...
0
votes
0
answers
30
views
Dynamic Core Management via Arm's PSCI on OdroidC4
I have been creating a basic core management tool which is able to dynamically turn CPU cores on and off using Arm's PSCI CPU_ON and CPU_OFF functions. This worked great on QEMU, however moving onto ...
0
votes
0
answers
72
views
Nightly Rust #[unsafe(naked)] function leads to undefined symbol linker error in --release mode on RISC-V
I am writing a hobby OS kernel in Rust for the riscv64gc-unknown-none-elf target. I have defined my trap_entry, as a #[unsafe(naked)] function within a Rust module.
When I compile in release mode (...
-1
votes
0
answers
52
views
What is the cause of `qemu_mutex_iothread_locked()` error?
I am working in a x86 architecture based 64 bit Operating System. I am using FatFs FAT32 Filesystem Library. I want to make FAT32 Filesystem on a AHCI SATA Disk by using below function
int fatfs_mkfs(...
1
vote
1
answer
95
views
I'm writing an Assembly x86 bootloader, but the printing function doesn't print the given string correctly
I'm writing a bootloader in x86 Assembly for my operating system. Note that I have already wrote a few bootloaders and I never faced this problem. This is the code that I compile with NASM (precisely ...
0
votes
2
answers
335
views
Sleeping Barber problem: how to prevent the barber from cutting before the customer is ready?
Recently, I've been studying the classic Sleeping Barber problem and came across a possible solution from Wikipedia:
# The first two are mutexes (only 0 or 1 possible)
Semaphore barberReady = 0
...
2
votes
1
answer
132
views
BIOS int 0x13 sector read works, but jump to loaded second stage code at 0x0800:0x0000 does not transfer control
I’m writing a simple bootloader that uses BIOS interrupt int 0x13 to read a second-stage loader from disk and then jump to it.
; boot\boot.asm
[bits 16]
[org 0x7C00]
jmp strict short start
...
0
votes
0
answers
75
views
AArch64 RPi4b bare-metal OS hangs after MMU enable
I am currently writing a small bare-metal OS for Raspberry Pi 4b for the AArch64/Arm64 architecture.
Unfortunately the OS hangs after enabling the MMU on real hardware. When testing the OS in QEMU ...
2
votes
1
answer
74
views
Why does UEFI GetMemoryMap return EFI_BUFFER_TOO_SMALL after allocating a buffer of the reported size?
I'm writing a UEFI application in Zig.
I'm calling GetMemoryMap() twice: once to get the required buffer size, then again after allocating the buffer using AllocatePool().
Here's my code:
fn ...
2
votes
2
answers
2k
views
PostgreSQL Error: "template database has a collation version mismatch" after OS upgrade After upgrading my operating system
template database "epa_db" has a collation version mismatch
The template database was created using collation version 1540.3,1540.3, but the operating system provides version 1541.2,1541.2
1
vote
2
answers
86
views
How to write a panic message if the UART is already locked by the panicking code?
I'm working on a hobby RISC-V OS kernel (QEMU virt) in no_std Rust and want my panic_handler to print the panic information to UART (is it the right way?).
My println! macro eventually calls a _print ...
2
votes
1
answer
554
views
ERROR in emulator start after aosp build Andorid Emulator I tried running
After successfully compiling the AOSP build from the repo tried starting the emulator with the command provided in the documentation
$launch_cvd --daemon
but encountered the following error log:
06-...
0
votes
0
answers
75
views
How is a multithreaded code (ex using OpenMP) converted to assembly?
For example, When I multithread a "for loop" using OpenMP, making the iterations as different threads, How does it get translated to Assembly?
Also can a multithreaded code run on hardware ...