#uACPI - a portable and easy-to-integrate ACPI implementation
1 messages ยท Page 51 of 1
well these are from netbsd right
they arent part of the C memory model
like as far as I understand, anything not adhearing to the C model works only because of implementation details
basically
and I guess technically if you choose std=gnuXX it could decide on a different memory model
but I doubt it is ever formalized lol
i mean, adding a r-r and w-w barrier for seqlocks is probably fine
like netbsd does according to the docs
but for the majority of the code i'd stick to the C11 memory model
as it's the de-facto standard now
also, it makes sense, it can be implemented efficiently and it was actually designed around existing implementations instead of just growing over time (as the linux model did)
if Linux was started today, it'd also use mostly the C11 model
i might steal producer/consumer tbh as this is exactly what i need i think
thanks for the link
is netbsd available on bootlin?
damn i think not
it only has freebsd
ok lol netbsd just compiles it to a no-op on x86
whats interesting is i dont see a compiler barrier being inserted there
or is function call itself considered a compiler barrier?
ARM does DMBST
but also no compiler barrier
very strange
actually on aarch64 there is no difference between r-rw and r-r
afaict
it's both dmb ld isn't it?
@loud ice ^
is function call considered a compiler barrier?
yes, if it's not inlined
or i guess dmb ishld
ah ok then it makes sense
does netbsd not do LTO?
although assembly cant be ltoed probably
the easiest compiler barrier is asm volatile ("" : : : "memory");
yeah i know, i was talking about netbsd, it implements barriers in separate assembly files
lto is not very popular for kernels
no C code at all
but i'd argue that you shouldn't rely on compiler barrier anyway except for very specific stuff (such as per-CPU atomics maybe)
it's pure poison to observability and debuggability
well if you define your own barrier you have no way of telling the compiler that it is one unless u use one of these
or a non-inline function call i guess
yes that's true
true
but it gives u free 5-10% perf usually out of nowhere
so the only mainstream arch where acquire and r-r are different at the hw level is riscv/mips, i guess?
that's probably also why the C11 model has no equivalent of r-r and w-w
its also very easy to make a mistake with r-r
like u have to actually understand what you're doing insanely well
yeah r-r and w-w don't compose very well with stuff around it
since they do not establish transitive orderings with other accesses
thats why smp_rb and friends suck
like, for a acquire-release pair on the same var, you can be sure that everything since it doesn't escape it
but that can't be emulated with r-r and w-w
like im sure that there are a lot of places in linux drivers using smp_rb expecting r-rw
which it is on a lot of arches as well
that's why I use it for uacpi points optimised builds 
probably very few people writing simple drivers understand the diff at all
thats the way
the most cursed assumption of the linux model is that plain accesses are atomic if aligned properly
Automatic conversion of the NetBSD src CVS module, use with care. Please submit bugs/changes via https://gnats.netbsd.org - NetBSD/src
i think XNU is LTO'd
i mean for production builds why not LTO
free points and you're not gonna be debugging it
they won't be dtracing it then
because developers are bad at writing code lol
^^
but linux is not, and windows has special handling from msvc because of their UB
ofc
nvm then
linux has supported lto since forever
the build system supports it
I think the perf increase is minimal in real world benchmarks
nah they managed to make it work
okay neat
but yeah
at least for most common drivers
i am influenced by bryan cantrill's philosophy around performance engineering
when do you even need r-r?
on x86 its a compiler fence
on arm you dont want a fence you want a consume ordering
he couldn't stand things like -fomit-frame-pointer because it impeded observability
With the Linux 5.12 kernel bringing support for building the kernel with link-time optimizations (LTO) when using the LLVM Clang compiler, here are some benchmarks looking at that performance impact as well as more generally seeing how the LLVM Clang compiler performance is looking when building the Linux kernel relative to GCC.
Recently using ...
ever since 5.12
which is disabled by default on new ubuntus iirc(?)
aka ```c
uint64_t magic_zero(uint64_t input) {
uint64_t output;
asm("eor %w[out], %w[in], %w[in]"
: [out] "=r"(output)
: [in] "r"(input));
return output;
}
uint64_t dependent_load_after(_Atomic(uint64_t)* ptr, uint64_t previous_load_result) {
return atomic_load_explicit(ptr + magic_zero(previous_load_result), memory_order_relaxed);
}
webkit uses it anyway (through custom magic)
it's useful for RCU and other techniques
yeah
there you can usually tolerate simply assurance that dependencies are respected, and full acquire is a worse penalty to pay
didnt it get undeprecated?
well cppref says deprecated in c++26
they have their own compiler?
no, they use clang
this is pretty much their impl lol
browsers are hard
@fiery turtle will ultra os use rcu/smr techniques?
i mean ofc, how can u avoid RCU in a serious kernel
consume is even harder to reason about though
you can still get quite far without
dragonfly is replicating or partitioning state between cores, to great effect
Managarm's kernel doesn't use RCU yet
what is SMR btw?
we will at some point introduce RCU though
shingled magnetic recording
managarm is a microkernel so its not as important
since the handle -> descriptor maps are quite costly without RCU
it's also not a serious kernel
real
can you not do fine grained locking on those?
just need to find somebody to implement it who doesn't have IP conflicts
both a general term for the approach of 'safe memory reclamation' (i.e. what you have to do when you want to do lockess things but haven't a tracing GC) as well as a sometimes term for a specific implementation of the approach invented in freebsd and now also used in macos and cpython
ah
what does that tell you about managarm 
yeah first i need to get over the log ring and then implement the rest of the kernel 
yeah that'd be possible
they've at least prepared for it, there's an rcu ready radix tree in libfrigg
but no reclamation mechanism yet
I have a friend who made a toy rcu implementation on his own, using the membarrier syscall
i just followed the original patent and paper, every jot and tittle
there's also a syscall which makes it possible to detect when you have been preempted iirc?
it's expired now
rseq I think
yeah that
on preemption it moves your rip to a pre-configured place or something alike
so you can handle a preemption path
it worked nicely for me because i am accustomed to working at dispatch IPL which is straightforwardly equivalent to a Classic RCU read section. but if i had to do threaded RCU i would be in a more dificult position since i think Sleeping RCU is still under patent
my friend used the membarrier to force a fence on the other threads of the process without the reader needing a hw fence
NT implements Sleeping RCU
Maybe the patent has already expired
or the engineers decided that if they implement it quickly enough the legal team cant stop them 
or they licensed it
do they implement the interface alone or is the implementation the same too?
of note IBM granted that liburcu is allowed to use sleeping RCU and be under LGPL
so in principle you could work with that and share your modifications to liburcu alone
and paul mckenney himself is the instigator in chief of the project to put something which exposes an interface very like Sleeping RCU into C++'s standard, so implementations will soon multiply
"yeah so what we did is we removed all of liburcu and then reimplemented it but its totally the same project, trust"
the lgpl isnt very clear
but the wording may imply that the patent license is granted for everyone
how does it work for patents ? if you change some details , can it be considered a different implementation which doesnt violate anything?
no one really knows, there's nothing so totally wanton and ghastly as the world of software patents
legally it's just a mess, terrible
the basic rule is how much financial clout you can bring determines how much they mean anything
the GPL has a patent grant clause
kinda vaguely
which makes this even more complicated
and the only observable effects of that whole rotten system is a nice numerical KPI that makes managers happy and vast amounts of terrible wastes of time in courts litigating by unpleasant firms
i suspect IBM wont sue you though
i think the FSF and maybe others would blow their lid if someone were sued for legitimately and peacefully forking an lgpl project then someone comes in and sues them over it
it would be complete subversion of the licence
the LGPL has a (kinda bad) patent grant clause
the question is how that works together with ship of theseusing the library
it would make a very interesting study for a lawyer, but in the end if IBM comes knocking then you give over
i mean its ms
so
given that ms used it i suspect ms legal said its fine
which means they think that either ibm wont sue, they have a licensing deal or they do not infringe
pitust is right, release builds are LTOd by default (but it's disabled for debug and kasan builds)
is it normal to get 1M more uacpi points withOUT -M q35 on qemu?
i thought that made the os faster
see the amount of opcodes it has to process
the average amount of opcodes/s also depends on what kind of opcodes it's running
if you try it on real hw you will notice that it's probably much slower
because it's running ops which are just more expensive than what's in qemu's q35 machine aml
trust with what?
what is this function used for?
if you want to compare some arbitrary number against other kernels then yes, use q35
but ops/s are in no way a performance measure
it Returns the PHYSICAL address of the RSDP structure via *out_rsdp_address
what more do you need?
shouldn't the kernel already know that though?
or is this kernel_api?
it's kernel api bro
kernel_api
bro
with?
the rsdp?
what kinda question is that
set the pointer to the rsdp?
rtfm
infy did NOT spend his time writing documentation just for people to not read it
๐ญ
And I thought I had good comments for the kernel api ๐ 
it is good tho
it is
or at least sufficient
i just needed a confirmation
thx
of course it's not 10 lines of information describing how every bit of that output variable should be set
Lmfao
but "put RSDP there" should be enough
uacpi will tell you if it worked
Use the C assignment operator
Or a return expression
To propagate an integer value to uacpi
Either it triple faults or not 
nah i think if you set the rsdp to garbage it just complains that it cant find correct signatures
True
this assumes you have proper exception handling set up
which apparently is a lot to ask from many people in this server
I think he just failed an assertion
So it didn't crash in fact
panic!
assert dominance
why does it start with uacpi_status_?
bindgen
i use bindgen too
show your script
x86 is not reduced hw tho
Why do u do it btw
it's gated
?
Prepend
Ah
All public facing api is already prepended so
And even internal api that has global visibility
I try my best not to pollute namespaces
i "borrowed" uacpi-rs's script and edited it to my liking
i know i just kinda accepted it and thought there was no way of fixing it
it has the reduced hardware thing
reduced hw is cringe
u also have barebones mode enabled
how do u even get it to load namespace and stuff
that code doesnt exist in barebones mode
conditional compilation
show proof or didnt happen
if you mean for the leaderboard, that requires -M q35
remove-talc?
yes
why
shit
also im gonna have my 9950x3D soon so ill probably start doing measurements for the leaderboards myself
nice
you can't do real phys allocations with talc
what do you use instead? or did you make your own
my own
why use talc when you can write your own allocator, find out frigg is way faster and switch to it
fuck dependencies
then find out proxima is faster and use that 
i don't want to make a lib os
yeah write your own bootloader
proxima might as well be using a bump allocator with those speeds
scratch that make your own cpu and motherboard so everything is ur own
I was just looking at proxima's allocator :^)
bootloader != os
thats the thing, a bump allocator is slower
dont have to depend on anyones microcode
WHAT
look at the pre-magazines version, its even simpler
same speed
uninitialised memory and stuff or something I don't remember
yeah because u get fresh memory every time thats cold
then how is proxima so fast
magic
and being a competent programmer
actually, i haven't looked into it, what allocators does proxima use
for page + malloc
or just divide the time given to uacpi by 10 and you will have 10x the ops/s
monkuous is really good
literally 144 lines
powder that makes you say real:
100-150 ns per allocation
i like how frigg uses mdbook
good software
the question is how to become that
should i make frigg bindings?
no
just make your own allocator ffs
imagine making your own allocator
couldnt be me
imagine being based like that
i cant because im gonna be stealing proxima's design 
instead of copying someone else's c++ code, pasting it in rust and just changing syntax
sometimes i make bindings
Ask chatgpt to convert frigg into rust
nah im good
lmao
when the code you need to copy is too big
well you use flanterm and uacpi too, i just make it accessible in rust
also you can't really make good bindings for frigg anyway because its header only with templates
imagine using flanterm
what do you use?
wdym errors
Errors
also what does your build script do? because i feel like im compiling llvm
bootsrap
uses gcc rust
no you dont
how so
i use bindgen without it bruh
wdym
bindgen requires libclang
you dont have to build it yourself
I always read binder instead
i do because i'm doing cross compilation too in that script
and debian builds are retarded
i use arch btw
yes
What if he also uses arch in the container
right?
over which he has no control
arch best distro
Arch do be like that
what changes between sleep and stall?
stall is just spin-pause
sleep is thread sleep
stall is meant to be a busyloop yeah
can i pass a spinlock to this?
no
mutexes are not spinlocks
oof
i think some people try but yeah no not the same
i use spin::Mutex and spin::SpinMutex
what do you do
mutex blocks the thread instead of spinning
since no_std
thats not a mutex
im aware
also i wouldnt use them
for me it's a noop but i will put a reschedule hint there
i'll make my own locks
but uACPI is not running on a thread for me
same, thats why what i do works the way i do it
@slim panther
i run uacpi and all that stuff on the main thread
when it takes 10 minutes to build a kernel that isnt linux, you know something is wrong
still
okay fixed it
mine took 14 seconds lol
well no offense but you probably don't have that many programs then
ik
try now
menix kernel takes like 5 seconds to build
he was talking about bootstrap
why am i building linux-headers
if ur userspace takes 14 seconds to build then idk what kind of userspace it is
because mlibc wants them
if you enable the linux option
i support some linux interfaces
like reboot, mount and so on
what is ctx here?
it literally says in the comment
ctx is passed to the provided handler
yes
hover over it
is my cpu cooked chat?
whatever uacpi puts in there
it's a pointer
you just pass it along to the function
huh?
what don't you understand?
this is my weird rusty way to do it
did you even look at the handler function type
like, rn my handler is just a pointer to the function
no
you make your own handler that calls that function
hmm
why only 1 handler fn?
wdym?
confusion
so it just installs 1 interrupt handler?
yeah
ohhh
what else is it supposed to do
that helps a lot, thx
i tought it could request more than 1
yes
technically it should support installing more than one IRQs, but other than SCI, what would uacpi request to install?
that's one (1) value
but from what George is doing won't that get overwritten the next call?
yes
yes
but there won't be a next call
i think even if so, uacpi wouldn't do it on the same irq
yeah but still, George's code won't work anyway
yeah but the handler_fn and ctx will get overwritten
wdym won't work?
in my code
gets overwritten
which is fine
so it can only actually support 1 irq install
if it works dont touch it :]
i have irq local context pointers
there's only one irq
so i can just store one ctx per irq
apparently you can't use a "closure" as a handler in rust
because local variable and stuff
also because of "x86-interrupt" abi
do it properly without the attribute
schedule_work is to create new threads, right?
๐
actually it doesnt really need that
i don't use x86-interrupt at all
yeah because x86_64 crate
wut
i dont
and small instructions
use os;
kernel::run();
thats why
but i can just use the pointer to a function that doesnt use that abi
bruh
why is it on by default
XD
all my homies call it an attribute
not abi
true dat
the x86_64 crate is shit
im aware
new and improved version
wait
i gotta change static variables
so i wont need them anymore
does interrupt stack frame even include the gprs?
why is irq on eoi hardcoded to 9?
I doubt it
shouldn't be but that's what it'll be anyway
it will always be above 8 and for the pic thats all that matters
pic
yeah
k
imagine not using ioapic
XD
this is what the interruptstackframe is
Uacpi only installs one for SCI and if you manually install a new GPE block (don't worry about it)
wait, you can cause a pagefault on command?
lol so it doesn't include the gprs
i dont need global vars
you can't do it properly with x86-interrupt
does x86-interrupt do swapgs?
no lol
yes
me when i corrupt my kernel because a user program tripped a breakpoint
nvm i do
spinlocks are a possible implementation of mutexes yes
but if you do that you'll get terrible multi thread scalability
only on that core tho
because when a thread needs to wait for the lock it spends its entire time slice busy waiting
- rn it is not on a thread
is this ok for uACPI mappings?
you should add the offset to the address you return (and also there is a bug in the mapping code)
ah wait nvm, you return the original address
c++ grindset
I get filling with zeros to 2^n digits, but why that many
why even type it out in binary
have constants that you | together
so you can actually read the code
yeah, ik
what type of dark magic are you suggesting, readable code? nahhh
i havent really looked at it yet
should i make it set and return the cpu's rFlags?
I return 0
k
And I've seen others do the same
uacpi doesn't care what you return, as far as it's concerned it's an opaque value that gets passed to unlock_spinlock
it's intended to be used to re-enable interrupts if lock disabled them
why is uacpi passing interrupt hanlders as 32 bit pointers?
how is that a 32-bit pointer?
unsigned int is a u32 no?
its the return value of the interrupt handler function
hmm
It's a function pointer
so why is it 32 bit?
It's a pointer to a function that returns error encoded as u32
the function it points to returns u32
unsigned int (*)(void *) means that something of the form unsigned int foo (void*) would be a valid target
k, thx
Though it does use u32 for GSIs... Probably because ACPI says so
yeah GSIs are 32 bit
i trim what uacpi gives me to remove it
i use trim but same idea yeah
how?
do you print a newline in the uacpi print function yourself?
i use my printf
Just don't print newline
that auto adds a \n at the end
yeah uacpi adds its own \n
std.mem.trim in zig
yeah
pain
Risky, it might break AML
?
(I'm doing the same
)
for logging?
This is bad
zig's log you cant turn off its trailing newline so i have to remove it
yeah printf shouldnt have a newline but a log function maybe ig
Printf is exposed to AML
No, I give uACPI my own sprintf impl
Or just don't insert your own new line
zig's log adds a newline so i have to trim and its annoying
doing a bool just for that rn
then id have to completely circumvent zig's logging
for regular printf it should probably not add a newline by default, you can make a println or something for that
how about you dont insert your own newline in uacpi
uACPI 3.0?
Its a standard convention in C
Fair enough yeah
well technically i wouldnt need to because calling the log functions there filters through to my log handler which in a kernel im overriding anyway
but the zig convention is no newline in the call to log
You could make it a define
yeah
use the weird c thing where you can concat strings by putting them next to each other and conditionally define a thing to either "\n" or nothing
what is UACPI_FIXED_EVENT_RTC?
RTC fixed event by uACPI 
well the uacpi enum value for the acpi RTC fixed event
which i dont know offhand but its in the spec somewhere im sure
found it
i think this is what that is anyway
wait so i can run the kernel, set an alarm, then when i rerun at a different time i can execute some code?
i think so
No, this is for shutting down your PC
ah
And then it starts at the programmed time
oh
doesn't the BIOS and UEFI do that automatically tho?
Do what
the event thing lets you easily detect when it starts on alarm
They don't use the rtc to start the PC, no
and i think also if it alarms while already on?
Why would they need it
?
Ye
you can set from the uefi panel to start up your pc at a specific time
idk if the fixed event triggers after a configured alarm boot actually
but the fixed event thing for it lets you call a function of yours when the alarm goes off with the kernel running
That's possible yes
whats UACPI_FIXED_EVENT_MAX?
Probably yes, because u can use it to determine the source which caused the wake
Not that it matters that much
I've never tried it personally
time to understand what the names are for
i meant what are the tables for here
RSDP (Root System Description Pointer)
The entry point into the ACPI system. It points to either the XSDT or RSDT table, which lists all other ACPI tables.
XSDT (Extended System Description Table)
Contains 64-bit pointers to all other ACPI tables. It's the modern version of RSDT (32-bit).
DSDT (Differentiated System Description Table)
Contains the primary AML (ACPI Machine Language) code used by the OS for managing devices and power. This is where much of the ACPI logic resides.
FACP (Fixed ACPI Description Table)
Provides fixed hardware details like power management timers, control registers, and pointers to FACS and DSDT.
APIC (Advanced Programmable Interrupt Controller table)
Describes the system's interrupt controller configuration. Used for configuring local and I/O APICs for multiprocessor support.
HPET (High Precision Event Timer table)
Details about the HPET hardware, which provides precise timers for event scheduling, replacing older timers like PIT and RTC.
MCFG (Memory-Mapped Configuration Space base address table)
Describes how to access PCI Express configuration space through memory-mapped I/O.
WAET (Windows ACPI Emulated Devices Table)
Optional table for Windows guests in virtual machines; provides hints to improve emulated hardware behavior.
BGRT (Boot Graphics Resource Table)
Contains information about the boot logo displayed by firmware, typically used by Windows to blend the OEM logo during boot.
FACS (Firmware ACPI Control Structure)
Used in conjunction with FACP for power management tasks like S3 resume (sleep/standby states).
oh thx
its logging what tables it finds
well, at least it booted up first try
oof
(i still have half of the API not filled in) XD
i need to move uACPI to a thread first
multithreading: โ
bsp for everything: 
You can run multiple threads on BSP...
hmm
this is not handling the power btn
i am pressing "power down" on qemu
and no message pops up
Skill issue
...
Does your kernel get an irq
sec
And show your install irq implementation
Did u unmask pic?
oh wait
and remap for that matter
i did not unmask for that one
PIC is ready
but not unmakes for that one interrupt
how can i get back the irq number when i uninstall the handler?
the ctx thing
well no the out_irq_handle
that thing
you can put anything arbitrary there
^
k
i allocate a struct for it and stuff the irq number and handler function pointer in there personally but you can do whatever
Did u implement io read and write properly
i did not add + 0x20
these ones?
It didn't say anything about omitting any api either
well, time to find how to implement those
Comments
on x86 theyre dead simple too which is nice
you mean these?
yeah
and idk what it is for 32
yeah use those
why?
it didn't tho
recheck your code
hmm, seems like my OS literally stops before finishing to init uACPI
and it seems to stop at the spinlock
when locking it
or well, it is calling it while the lock is locked
hmm, but it's not uACPI's fault
seems like a deadlock somewhere
found the culprit
it was vmm or pmm
one of the 2
@fiery turtle if i get a Failed to initialize: out of memory
which api call should i look at
anything with create
but in the kernel_api,?
well obviously
maybe the alloc functions?
yeah this wont work
what do i do with these?
implement
f
for event u can return any non-null handle
if u want it to be a no-op
for mutex u can also return anything non-null, just make sure its not always the same value
but this wont work on real hardware of course
well it might at first as long as youre strict single threading
Simple spinlock is like 4 LoC
added those methods and now i get these
you messed something up in the kernel api
same thing happened to me
idr how i fixed it though
I mean, it seems like you ran out of memory, so your allocator function returns null for whatever reason
how can i get cpu information other than lapic address from MADT?
Define cpu information
Most of the stuff you will find via cpuid (vendor, family, name, topology, etc)
And not via acpi
i mean things like how many processors there are, their ids, which one is the bsp, etc
The lapics are the thing that represents the different cpus, and you can read the current lapic id via an msr iirc, which is how you know which one is the bsp
It should have an entry for each lapic in the system and it's id iirc
couldnt find where the id is, only the address but ig i can match it to the address i get from msr
There is an entry per cpu, you might be parsing the table wrong if you don't find it
The address override can be basically completely ignored and iirc you should only use the msr to access the lapic
the madt lists the lapic ids of each processor, and you can read the bsp's lapic id from its lapic registers
well, now i fixed the out of memory
but these still remain
Well, print the error code that they return, I am pretty sure every uacpi functions returns an error code
Could be you stub or implement incorrectly some Io or pci read/write functions?
pci function all return OK status
but why is the power button failing to install then
Don't return ok for stubs that have side effects
Because it thinks you are writing but it doesn't
pwr button is PCI?
No idea, but could be that it needs pci access for it
For every stub you have don't return OK if it had a side effect like read/write
Return an unimplemented error
And then you will know when uacpi calls it and expects it to work
lemme try to disable the usb hubs i enabled on qemu
nope, still PCI error
time to write a PCI driver then
u dont need a pci for power button
u need a proper io_read/write
which yours isnt i guess
i have
show
Lol
Nice
thx infy
np
"works"
there could be 2 things:
- the handler is not registered correctly
- qemu is not using acpi for power down function
yeah well, i suspected
time to see if it receives the isr at least
no irq is being fired
oof
PICs are unmasked
but no interrupt is generated
and it's trying to register the interrupt at irq 41
yeah well it is 9
i am adding the 0x20 to it
but i may have found the problem
no irqs are being fired
not even PIT
normal interrupts work tho
whats a normal interrupt
like 0 to 31
thats called an exception
hmm
qemu pauses on this instruction
prob a crash
but no execption is caught by my interrupt handler
when uacpi calls the stall function
this is my stall function
Cr2 is null
This makes no sense
yeah ik
idk what happens there
pause gets called from archPause
did you turn kvm off?
then it won't log exceptions
wdym won't log exceptions?
5+ minutes
what is it doing lol
wsl is a vm
and then resume
why?
idk
I also do and it's not the problem
doesnt qemu run natively on windows?
yes
mine starts instantly too, but qemu freezes for a bit and idk why
(most of which is printing to screen being slow(
the boot logo thing?
weird
tbh if you do stupid stuff like mapping the entire hhdm using 4kb pages + a naive bitmap allocator with no optimizations you can get pretty large slowdown at boot
i map only the entire memmap
but like, the OS does execute i think, bc after it unfreezes a bunch of log instantly appear
it's still a good idea to use 2mb pages
I don't use HHDM 
how
Temporary mappings
no limine?
With limine
but the only way to access phys mem is with hhdm ๐ณ
I mean my kernel also boots with Hyper
I just don't map it in my page tables
well if you allocate the regions you temporarily map the pages to I wouldn't call it a hhdm
or well ig it could still be but like with the definition of hhdm where its all the memory mapped at one static offset not just small chunks mapped at different allocated positions
idk why the qemu app just freezes for no reason, while the OS keeps going in the background
i cannot press any button in the app
any idea why it was crashing there tho?
run it with -d int -no-reboot -no-shutdown without kvm
and smm off?
if there is no exception then another thing to check is that interrupts are enabled at the point where you pause nvm I though of hlt lol
i do cli before that
bc it fails here
oof, running with -d int is pain rn
i cannot send the shutdown signal
i'll add it via code
why?
Only before I load my page tables
but the OS still runs in the background
I just have a region of 16 pages where I map different addresses
done
only look at the last one
the one before it is the PIT timer
maybe
ok nope
last interrupt is the framebuffer
before it RIP points at my terminal
oh, that's PCI?
If it failed to prepare there's no reason to call enter, it won't work
Idk, it says unimplemmented, you return it somewhere
Just hang or return instead
no, i was referring to incompatible AML type
people refusing to implement the kernel apis is crazy
Its a bug in your api
what's the point of a kernel api anyway if people just don't implement it
i think you should remove it
i still did not create a pci driver
True
that's why
Its just annoying when people ask for help but they don't even bother implementing the api and stub most things out
Like yes that won't work
It exists for a reason
it did not fail to prepare btw