#uACPI - a portable and easy-to-integrate ACPI implementation

1 messages ยท Page 32 of 1

gentle peak
#

that's possible too but that's not really defer anymore imo

calm latch
#

Defer in Go just calls a function

gentle peak
#

still better than nothing (and arguably better than defer)

dense steppe
#

if you want fancy features like this in C, imo it might be best to switch to C++

mortal yoke
#

yeah there isn't much point in using c

#

c++ is supported basically everywhere where c is

dense steppe
#

afaik Linux nowadays has some weird "scope guards" implemented using __attribute__((cleanup))--although I'm not sure how widely used they are

calm latch
#

It's not fancy, error hanging sucks in C

#

You've got to use different atrocities all the time

dense steppe
#

yeah ik

#

but I think this is more of a recent thing

calm latch
#

In the sense that it can be compiled with few compilers, and you as compiler dev would add missing function for Linux

fresh laurel
#

hey can someone pass the github for this project?

north holly
fresh laurel
#

i do not want to scroll on 30000 mesages

fresh laurel
north holly
#

#1217009725711847465 message

#

also take that

fresh laurel
#

yeah im starting to look at AML and i dont want to parse it

fiery turtle
#

uACPI had one skill issue vs ACPICA as I realized from @ marvin's AML blob

#

If there was an undefined AML reference in an IfOp or WhileOp the entire table load would get aborted

#

whereas ACPICA knows how to skip them cleanly

#

uACPI could only skip methods/devices etc

#
[uACPI][WARN] unable to lookup named object 'DTFS' within (or above) scope '\': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object 'DTFS' within (or above) scope '\': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object 'DTFS' within (or above) scope '\': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object 'DTFS' within (or above) scope '\': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object 'DTFS' within (or above) scope '\': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object 'DTFS' within (or above) scope '\': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object '\_SB_.PC02.GBES': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object '\_SB_.PC02.HDAS.VDID': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object '\_SB_.PC02.I2C1': not found
[uACPI][WARN] Op 0x0010 ('ScopeOp'): skipping due to previous errors
[uACPI][WARN] unable to lookup named object '\_SB_.PC02.I2C5': not found
[uACPI][WARN] Op 0x0010 ('ScopeOp'): skipping due to previous errors
#

Well not anymore LETSFUCKINGGOOOOOO

leaden fox
fiery turtle
#

Previous output:

[uACPI][ERROR] unable to lookup named object 'DTFS' within (or above) scope '\': not found
[uACPI][ERROR] aborting table load due to previous error: AML referenced an undefined object
[uACPI][ERROR]     #0 in \()
fiery turtle
#

technically false yes

leaden fox
#

honestly feels kinda like lua

fiery turtle
#

this is more of a workaround for braindead firmware devs

#

that dont test their own code

fiery turtle
#

new test coming soon

mortal yoke
#

that same thing would happen in qacpi if it's at the top level

fiery turtle
#

get to work ultrameme

#

they literally had one under a CondRefOf check, but the other SSDT decided to not do that

mortal yoke
#

I guess I could just make the unwind function unwind individual frames if at the top level though that might create some interesting errors later on

fiery turtle
#

basically it unwinds only pending ops but not the top one (which is the If/While)

#

which are skipped if the OPERAND ends up being NULL

dusky glade
#

boo

fiery turtle
#

?

dusky glade
#

im just saying hi

#

plus good to see uacpi development as active as ever

fiery turtle
#

๐Ÿ‘ป

dusky glade
#

dies of scaredness

slim panther
#

infy was right

#

amd did favor menix

#

on my 265kf i now only get 3.2mil

#

on my 7700X i got 3.9

vagrant hull
#

time to optimise :^)

thorny orbit
#

how to check a speed with uacpi

#

like in this table

calm latch
#

it should print the speed once you load the namespace

thorny orbit
#

with -q35 and kvm args ?

calm latch
#

yes

dense steppe
#

-M q35 -enable-kvm

thorny orbit
#

ok

dense steppe
#

is it allowed to just toss absurd amounts of memory to the VM? like qemu-system-x86_64 -m 48G?

thorny orbit
dense steppe
#

not if you have 64GiB of RAM

thorny orbit
#

yes

dense steppe
#

hence the question

#

is it allowed?

calm latch
thorny orbit
#

if you have 64G yes

dense steppe
#

although it'd probably perform worse tbh, because of cache behavior

calm latch
#

is that allowed? Thonk

mortal yoke
#

yeah no, I think it has to be like an actually usable one

#

that's not very usable in the long term

dense steppe
#

it goes against the spirit of the competition

calm latch
#

My score was with everything enabled

#

like mutexes, proper memory allocation and so on

#

and userspace since it's where uACPI ran

dense steppe
#

I don't even have any options to disable any of that :p

thorny orbit
#

with amd ryzen 5 3600

#

is this value is small or big

calm latch
#

kinda on the smaller side

#

what CPU do you have?

mortal yoke
#

ryzen 5 3600

calm latch
#

bruh i can't read

dense steppe
#

we should really do something where the competition benchmarks are performed on a "standardised" set of machines; you send a .iso to some people who are responsible for running the benchmark, and they run it. that way, everyone's code runs on the same machines

calm latch
#

just ask someone with a fast CPU meme

calm latch
mortal yoke
thorny orbit
mortal yoke
thorny orbit
#

to qemu

#

a

#

wait

#

why you paused

mortal yoke
#

yeah that's what I were thinking about (it gets stuck when it tries to printf in some exception handler when locking a lock inside printf), Ill try with a higher amount

dense steppe
#

I did qemu-system-x86_64 -enable-kvm -cpu host -M q35 -m 4G -no-reboot -drive file=/usr/share/edk2/x64/OVMF.4m.fd,if=pflash,index=0,read-only=on -debugcon stdio -nic none -cdrom output.iso on a 7950X3D and I get 1702 ops in 2ms (avg 834686/s)

fiery turtle
dense steppe
thorny orbit
dense steppe
#

idk. that's what uACPI prints when I boot your ISO

north holly
mortal yoke
#

probably because of -nic none

fiery turtle
#

^

dense steppe
#

just sneakily memset(dsdt, 0, sizeof(dsdt)) before running the benchmark

fiery turtle
dense steppe
#

I'm not going to integrate uACPI into my kernel until I actually have userspace and drivers that would be able to make use of it.

fiery turtle
#

You could still use it in early table mode

#

That doesnt require much api

dense steppe
#

yeah

#

I probably should do that

calm latch
#

btw i think you could add some guards to turn the compilation of everything off and only leave table things in uACPI instead of making it a separate project (?)

fiery turtle
mortal yoke
dense steppe
#

what is your CPU?

fiery turtle
#

I was going to introduce a bare bones mode

calm latch
#

oh, i must have misunderstood it

mortal yoke
dense steppe
#

like #define UACPI_BARE_BONES and it doesn't compile any namespace management or AML interpreter?

dense steppe
#

well tbh, if that existed, I would probably still just stub out unimplemented APIs like ```c
uacpi_status_t
uacpi_os_do_something (...)
{
return UACPI_NOT_IMPLEMENTED;
}

fiery turtle
#

Yeah that's why its not a priority

#

Its not exactly hard to stub out everything

#

And just use early table access

dense steppe
#

stop it I am getting ACPICA flashbacks

fiery turtle
#

Lol

dense steppe
#

btw how's 1.0 going?

fiery turtle
#

Very close to being done

#

Next week perhaps

dense steppe
calm latch
#

but the interest is also in it being very small

#

(although I guess lto takes care of that)

fiery turtle
#

Yeah its especially nice for separating out built-in kernel driver vs modules

#

Or microkernel etc

gentle peak
#

i don't think you'd even need lto to make it small, just -fdata-sections -ffunction-sections combined with -Wl,--gc-sections should take care of that

fiery turtle
#

Yep

dense steppe
#

I've had cases where I have some function that calls into another function that I have no implementation for, which would generate a linker error, were it not for the fact that that function is optimized out because it is never called.

north holly
#

I'm gonna test the latest uacpi commit (I don't want to debug stack corruption rn)

vagrant hull
#

uACPI is gonna use semver right?

fiery turtle
#

Yes

vagrant hull
#

so is it gonna be 1.0 or 1.0.0?

fiery turtle
#

The latter

vagrant hull
#

awesome

#

good choice on both counts

fiery turtle
#

I like semver

north holly
#

I tested both master and address-spaces-support

#

the latter worked

#

master also worked

mortal yoke
#

@thorny orbit your get uacpi_get_ns_since_boot is broken, why do you read the raw hpet counter at 0xF0 and subtract whatever the current unix time in seconds was at the time of boot from that?

#

that doesn't make any sense

vagrant hull
#

๐Ÿฆ†

thorny orbit
mortal yoke
#

just read the spec, its like the actual time date stamp in unix seconds and not how long the boot takes or anything

thorny orbit
#

then do I need to convert cmos to unix subtract and convert result to nanoseconds ???

mortal yoke
#

you don't need to use the boot time request at all for this

#

you need to figure out the hpet frequency by reading from the capabilities register and then use that to convert the hpet counter value you read to nanoseconds

fiery turtle
#

And I have some changes that are local atm that are also semi dangerous

fiery turtle
#

nyaux is faster

thorny orbit
fiery turtle
#

for nyaux it was because allocator bug

thorny orbit
#

๐Ÿ™

fiery turtle
#

yeah im gonna add a warning like "your clock source might be unstable"

thorny orbit
#

it slow

north holly
thorny orbit
#

but ok

#

a

#

is uacpi_kernel_get_nanoseconds_since_boot also used for average speed ?

fiery turtle
#

how else do u think it can get elapsed time

thorny orbit
#

do i need to implement uacpi_kernel_install_interrupt_handler to handle power button event

fiery turtle
#

yes..

thorny orbit
kindred beacon
#

current managarm score:
uacpi-info: successfully loaded 1 AML blob, 1747 ops in 0ms (avg 4644312/s)

kindred beacon
#

14700K

fiery turtle
#

LETSFUCKINGGOOOOOO 2nd place

slim panther
#

kms

fiery turtle
slim panther
#

right...

fiery turtle
#

udrm got into your head

slim panther
#

not the only thing i will put through my head

torpid root
flat badge
#

It's quite nice that Managarm's score got 25% faster just by uacpi improvements ๐Ÿ˜„ Good job optimizing uacpi

#

actually more like 40% faster

fiery turtle
#

thanks

slim panther
#

yea this

thorny orbit
fiery turtle
#
If (PATH.THAT.DOES.NOT.EXIS.T) {
    Debug = "???"
} Else {
    Debug = "OK"
}

uACPI now skips the else block as well after an error like this

#
[uACPI][WARN] unable to lookup named object '\PATH.THAT.DOES.NOT_.EXIS.T___': not found
[uACPI][WARN] Op 0x00A0 ('IfOp'): skipping due to previous errors
[uACPI][WARN] Op 0x00A1 ('ElseOp'): skipping due to previous errors
[uACPI][INFO] successfully loaded 1 AML blob, 3 ops in 0ms (avg 10733/s)
#

ACPICA output:

Firmware Error (ACPI): Could not resolve symbol [\PATH.THAT.DOES.NOT.EXIS.T], AE_NOT_FOUND (20200925/psargs-395)
ACPI: Ignoring error and continuing table load
ACPI Error: Skipping While/If block (20200925/psloop-461)
ACPI Error: Skipping Else block (20200925/psloop-464)
fiery turtle
#

question of the century

#

does NT skip stray ElseOp blocks without a previous If

#

have to disable secure boot to find out

loud ice
#

you could rev acpi.sys

fiery turtle
#

i have my trusted windbg + qemu

mortal yoke
#

Ill bet it would as that's one of the simple ways to implement if

fiery turtle
#

yet another acpica incompat? ๐Ÿคฏ

fiery turtle
mortal yoke
# mortal yoke Ill bet it would as that's one of the simple ways to implement if

I did it like that in qacpi, basically for if when the condition is true it just falls through to the body and then if it encounters an elseop anywhere it just skips the body of it (and if the condition of the if was false it checks if there is an elseop following the if body and if there is it jumps to the else body)

mortal yoke
fiery turtle
#

i guess ill do that too then

mortal yoke
#

it probably doesn't matter tbh

#

unless someone is using it for some kind of weird nt detection

fiery turtle
#

i could see it break in various ways

Else { 
  // Do bogus crap
}
#

if bios patches the blob poorly

#

u could run bogus aml

#

that nt would never touch

mortal yoke
#

yeah but if you just skip the body

loud ice
#

just precompile the tables into your own bytecode which doesn't suck as hard meme

fiery turtle
#
Else {
}
// Do bogus crap
winter orbit
fiery turtle
#

NT went out of their way to detect stray ElseOp

#

what can I say

fiery turtle
#

i guess ill just skip the body if its stray

mortal yoke
#

its easy to implement at least, though if you already create a new frame for the if body in uacpi then you could also just abort if you want to match the nt behaviour

fiery turtle
#

yea

#

its not something ive ever encountered but who knows how braindead firmware aml patching code might be

loud ice
#

im sure its great

winter orbit
loud ice
#

great at breaking shit at least lul

flat badge
#

I'd suggest to add both nt and acpica compat modes for cases where they fundamentally disagree

#

NT support is not ubiquitous outside of consumer products

winter orbit
#

depends on if you consider enterprise hardware consumer or not i guess

dense steppe
#

maybe this compat could be like a quirk, so you pass acpi_compat=nt for NT compat and acpi_compat=acpica for ACPICA compat. this would be reflected as some sort of uacpi_set_compatibility_mode (UACPI_COMPAT_{NT,ACPICA})

flat badge
#

yeah

dense steppe
#

although having options for compatibility with both NT and ACPICA would make maintenance harder

#
  • more stuff to test
#
  • more behaviors to implement
flat badge
#

but for example, AWS graviton (by far the most widely deployed ARM server) uses ACPI but doesn't support windows

#

etc

loud ice
#

i suspect those kinds of things are less likely to have broken acpi

winter orbit
#

lol

#

thats cute

flat badge
#

I wouldn't count on that

loud ice
#

lol

#

fair

#

theres less of them at least

flat badge
#

AWS bare metal only supported bios boot until like 6months ago meme

loud ice
#

you cant BUY a graviton, right?

flat badge
#

on x86

dense steppe
#

IMO it is better to aim for good consumer firmware support, and hope that enterprise firmware eventually gets its stuff together, than to attempt to tailor to both

#

I think uACPI will end up better that way

flat badge
#

IMO a switch "nt compat / acpica compat" makes a lot of sense

loud ice
#

yeah

winter orbit
#

Enterprise firmware is still going to be made by the "big 4" in bios dev anyway though

#

amazon didnt go with an inhouse solution for what is being brought up here either

flat badge
#

where compat != bug compat. if the behavior is considered to be a bug in e.g. acpica, there's no need to support it

dense steppe
#

well then hope that eventually, the "big 4" are practically required to test for uACPI

#

a man can dream

winter orbit
flat badge
#

sure, but amazon certainly never tested these machines with NT

#

considering that they cannot boot NT

winter orbit
#

I don't think you're correct on that

fiery turtle
#

there are some cases that make ACPICA compat very expensive/inpractical to support

#

e.g. they allow buffer resizing via StoreOp

#

which means uacpi must have a mutex per object now

loud ice
#

#ifdef UACPI_ACPICA_COMPAT

#

or a GIL

fiery turtle
#

yeah

flat badge
loud ice
#

or a global buffer access lock lul

flat badge
#

and have the mutexes outside of the objects

fiery turtle
#

hashed locks?

flat badge
#

to not pessimize the NT mode

loud ice
fiery turtle
#

ah lmfao

loud ice
#

and you choose which one by doing global_locks[object addr % 32]

#

or whatever

#

its free inline

fiery turtle
#

maybe at some point, if there's some firmware that breaks with NT compat

loud ice
#

and still saves you from a lot of contention

dense steppe
#

object addr % 32 would probably not be very good, as object addr is likely to be aligned

#

but the idea is good

winter orbit
fiery turtle
flat badge
#

linux ppl would 100% complain if it's not acpica compatible meme

winter orbit
#

linux people dont understand acpi

#

at all

fiery turtle
#

so far they have complained about the opposite

dense steppe
#

I think very few developers understand ACPI

#

like, I understand some parts of ACPI

#

but not the entire thing

winter orbit
#

That's because it's written by liars and implemented by idiots

loud ice
#

honestly i'd do hashed locks for everything

#

(except aml mutex objects ofc)

fiery turtle
dense steppe
dense steppe
loud ice
#

oh god

fiery turtle
#

lmfao

loud ice
#

2027 is the year of the uacpi monopoly

#

trust

dense steppe
#

make it happen

gentle peak
#

in 2029 NT will switch to uacpi

loud ice
#

no the monopoly is when nt switches 4head

winter orbit
#

We'll be using uACPI at CLT this year

#

but i wont be able to show the cool things like suspend

fiery turtle
#

CLT?

winter orbit
#

its just going tobe powering the display laptops

fiery turtle
#

ah cool

winter orbit
#

The reason im trying to speed run this before march

dense steppe
#

In all seriousness, I think it would be useful to (once uacpi-linux atleast somewhat proves its usability) propose the idea of uACPI in upstream to the linux-acpi mailing list. Even if nothing becomes of it, it is a first step.

fiery turtle
#

there's a problem with this

#

there are thousands of call sites directly using acpica

#

its not abstracted away like NT

#

so u cant do it gradually

loud ice
#

so step 1 abstract it away?

winter orbit
#

NT supermacy

dense steppe
#

maybe that can be a first step

loud ice
#

you can

dense steppe
#

abstract away the old interfaces

loud ice
#

gradually move to an abstraction

#

then swap the abstraction

fiery turtle
#

if someone wants to do that work im totally down to help out where I can meme

flat badge
#

that probably won't be accepted unless you demonstrate added value

winter orbit
#

ACPI on linux has been proven to be completely broken

#

now its not broken

#

value

#

๐Ÿ‘

loud ice
#

lol

dense steppe
#

well first you need uACPI

winter orbit
#

"sorry suspend isnt something linux needs"

dense steppe
#

so... to unbreak it, you need uACPI. to get uACPI, you need abstraction. for abstraction, you need value. for value, you need to unbreak it

fiery turtle
#

if we're being more serious, acpica is slower and dies on every possible aml edge case, while also being subject to a lot of race conditions uacpi protects against

dense steppe
#

:p

#

yeah that's something that linux people will definitely listen to

#

performance

flat badge
#

that's true

winter orbit
#

These are the same people that basically told us to eff off when we asked them to stopped declaring themselves as the latest windows versions

#

so we will see

fiery turtle
#

i think iretq measured uacpi time to load the namespace vs acpica (on linux) and it was like 5x difference

#

acpica was like 600k ops/s and uacpi was about 3M

#

that was older uacpi too (i think)

winter orbit
#

10m now

#

10x engineer infy

fiery turtle
#

15M is the WR by monkuousultrameme

dense steppe
#

that's fast

fiery turtle
#

with AVX2 in kernel

winter orbit
#

Sadge I can't beat it

fiery turtle
gentle peak
#

there was some other stuff too but i don't remember

#

that's the most important of it though

winter orbit
#

let me compile reactos with avx2

fiery turtle
#

monkuous' mutexes take 8ns to acquire tho

winter orbit
#

actually i don't think i even can

fiery turtle
#

and the allocator about 200ns per allocation avg

gentle peak
#

about 150ns now on the version on github

#

and iirc the one in that benchmark had a slightly less capable but faster allocator that could do 100ns

mortal yoke
winter orbit
#

lol

#

i wish

mortal yoke
#

doesn't windows save xmm0-xmm5 inside irqs and such?

dense steppe
#

avx512 kernel when? meme

winter orbit
#

also that's a win10 22 trick

fiery turtle
#

Anyway it could be RFC'ed into Linux with demonstrable value (at least in like a week with 1.0), but its just way way too much work atm for me to go through, so maybe if someone with a lot of free time comes along meme

dense steppe
#

it would be pretty cool to participate in this effort

#

but time is a finite resource

fiery turtle
#

its mostly tedious manual work

#

an abstraction layer is more work tho

#

which idk where to begin

calm latch
#

I'm getting done with my exams in 3 days ultrameme
(though I have very little idea of how Linux works inside)
so idk

mortal yoke
winter orbit
#

I don't know the details but the guy who was implementing these things in reactos went on quite a rant

#

id hvae to go hunt for the long rant

fiery turtle
#

but anyway thats more of a thought experiment for now

dense steppe
#

implementing the uacpiโ†’kernel interfaces would probably be very easy on Linux

fiery turtle
#

thats already done so yeah

#

its just stuff copypasted from acpica

#

but yeah they definitely won't accept a direct replacement, it would have to be configurable, at which point u need a unified abstraction

flat badge
fiery turtle
#

which is probably also multiple years of work

flat badge
#

would maybe be interesting to make managarm work + to test uacpi on it

fiery turtle
#

true

flat badge
#

and the story is probably similar on enterprise x86 servers

fiery turtle
#

x86 server blobs i have do test for windows, at least via osi

flat badge
#

for example on a random dell power edge that i just looked up, the OS support is:
VMware ESXi NFI (License Not Included)
SUSE Linux Enterprise, Non Factory Install, Requires License Selection
Ubuntu Server Non Factory Install, x64,Reqs Subscription Selection
Red Hat Enterprise Linux 9.4 Factory Install,x64,Requires Subscription Selection

winter orbit
fiery turtle
#

that would be cool

fiery turtle
fiery turtle
#

btw ACPICA on linux by default has the "slack" mode enabled

#

which basically violates both the spec and nt compatibility in many ways

#

Like it automatically pre-zeroes locals etc

#

whereas NT just aborts on uninitialized local use

#

and the spec obviously says they're uninitialized by default

#

ObjectType for predefined scopes is broken on ACPICA as well, whereas NT is spec compliant

#

the list is infinite

#

they dont give a shit basically

gentle peak
#

btw if anyone with a cpu faster than a 5800x wants to test, here's the latest proxima with all the (disqualifying) tricks that the WR ISO had

#

it's incompatible with smp mostly due to me not bothering to copy the xsave init asm to the smp entry point

#

on my cpu it gets ~12M

fiery turtle
#

can u paste the command line also?

gentle peak
#

qemu-system-x86_64 -accel kvm -cpu host,migratable=off -M q35,smm=off -cdrom proxima.iso

#

may have to test it a few times because sometimes the host schedules it weirdly and the performance gets multiplied by 0.3

#

and for reference here's the latest normal build of proxima (aka the codebase that's going to be on git somewhat soon, built normally for x86-64-v0) which gets 7.2-7.6M on my cpu

#

same command line

fiery turtle
gentle peak
#

yep

#

it has some local changes but none in the code paths that the benchmark touches so theoretically this should be the exact same as the latest build on github actions

flat badge
#

windows servers are not exactly uncommon either

#

it's just that in contrast to consumer devices, not every enterprise device supports windows

#

actually i wonder how acpi behaves on linux-based consumer devices

#

do chrome books for example even have acpi?

fiery turtle
#

they do

flat badge
#

did you ever test on them?

fiery turtle
#

well i did run them in userspace, if that counts

#

the pitust's blob

flat badge
#

did it work?

fiery turtle
#

yeah ofc, it's fairly carefully written aml too

#

it's only 3k lines of ASL

#

modern laptop x86 is like 300k loc sometimes

flat badge
#

ah

#

that's not so surprising

fiery turtle
#

it says COREBOOT as OEM ID so I assume it's some open source stuff customized

mortal yoke
fiery turtle
#

there's definitely a lot of dead code

winter orbit
#

Itโ€™s the generic platform code unmodified

#

same with a lot of arm chrome books

flat badge
#

do arm chrome books use acpi?

winter orbit
#

Some of them

#

Mediatek ones donโ€™t Iโ€™m pretty sure

fiery turtle
#

[uACPI][INFO] successfully loaded 2 AML blobs, 1431 ops in 8ms (avg 172183/s)

#

chromebook AML is smaller than base QEMU

vale isle
#

that's how they get that sweet fast boot

dense steppe
#

but it's slower than the record, I think

gentle peak
#

the pci stuff indicates that you're not using -M q35

dense steppe
#

oh damn I forgot that

#

1sec

gentle peak
#

also performance seems to improve with less memory

#

so don't bother passing -m <whatever>

dense steppe
#

ok now it is more reasonable

#

though surprisingly slow, if the record is 15M

#

now I get avg 7011238/s

gentle peak
#

what cpu do you have?

dense steppe
dense steppe
gentle peak
#

hmm what

#

that exact iso on a 5800X gives 12M

dense steppe
#

my QEMU command line was this: qemu-system-x86_64 -M q35 -enable-kvm -cpu host,migratable=off -drive file=/usr/share/edk2/x64/OVMF.4m.fd,if=pflash,index=0,read-only=on -debugcon stdio -m 112M -cdrom proxima.iso

gentle peak
#

what's your qemu command line?

gentle peak
#

no idea what the issue there is but the performance is abnormally slow

#

also is that just the first result or did you run it multiple times? sometimes the vm gets scheduled weirdly and performance suffers because of it

dense steppe
gentle peak
#

yeah i have no idea what the issue is here

dense steppe
#

cpu skill issue

#

except not

gentle peak
dense steppe
#

maybe my QEMU binary is different

#
ฮป       qemu-system-x86_64 -version
QEMU emulator version 9.2.0
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
gentle peak
#

i'm on 9.1.2

dense steppe
#

so unless there's been some performance regression (highly unlikely), that's not the cause

gentle peak
#

might take a while to check

dense steppe
#

no

hallow marten
#

weird then

dense steppe
#
ฮป       uname -a
Linux beast 6.12.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 02 Jan 2025 22:52:26 +0000 x86_64 GNU/Linux
dense steppe
fiery turtle
dense steppe
#

I have 250Mb internet, (mainly because my brother wouldn't stop screaming that his xbox was lagging trl), but I can only really make use of 100Mb of it, because the cable that connects my computer with the router is actually bad and breaks down.

dense steppe
gentle peak
#

i wonder how much better/worse this would be with debugcon logging instead of fb

dense steppe
#

but like actually wth is this shit

#

I shouldn't really complain, 100Mb is great compared to some other internet speeds that people may have

#

but to be limited by the network cable, that's just sad

gentle peak
#

my internet speed is limited to 29Mb due to my ISP

dense steppe
#

๐Ÿ˜ญ

#

slow internet sucks

hallow marten
#

1gb/s

#

but I dont have a cable going through my wall

#

so

#

I'm using wifi

dense steppe
#

:p

hallow marten
#

at like 200mbps

torpid root
north holly
#

I have fast internet

#

I forgor how fast

torpid root
#

I technically have 70 mbps

#

I don't get more than 5-6mb/s

hallow marten
torpid root
#

want to switch isps?

loud ice
loud ice
dense steppe
torpid root
#

not much I can do about it

north holly
#

overthrow the government

torpid root
#

It's in the works

dense steppe
#

overthrow the ISP

north holly
#

DOWN WITH THE ISP1!!

dense steppe
#

just do some l33t h4xx0r1ng to get yourself better internet

torpid root
#

isorrowproductions

north holly
#

also turns out compiling gcc is quite slow on my laptop

torpid root
north holly
#

he means REDACTED

dense steppe
#

hack the isp to get yourself better internet (except don't do that because it is illegal)

torpid root
#

they even disabled access to my router

#

password changes on reboot

median crest
torpid root
#

and internet stops when I disable remote control thingy

dense steppe
#

that's just horrible

#

like

#

that's a privacy issue goddamnit

torpid root
#

perchance

north holly
torpid root
#

there's only 2

mortal yoke
#

do they force using a specific router?

north holly
#

with fredom

torpid root
#

both are the same shit

torpid root
mortal yoke
#

and it doesn't work on other ones?

dense steppe
#

clone the MAC address (except don't do it because it might be illegal)

north holly
#

get a better router, then make it spoof itself to impersonate

torpid root
#

they supply their own and change it out once in a while

north holly
#

the ISP's router

torpid root
slow drift
dense steppe
torpid root
dense steppe
dense steppe
#

idk

#

but I don't think it is that common

#

it's just a way that it might be done

#

it is extremely bad because of MAC spoofing

#

for example, if the only authentication was MAC address and I knew your MAC address, I could very easily pretend to be you, and thus freeload on your internet

#

I think this might be one reason that ISPs provide modems, so that they can authenticate that whoever is using the internet is a legitimate customer and not someone who is MAC spoofing

torpid root
#

It's unlimited

dense steppe
#

unlimited* (until they decide "no more internet for you this month")

torpid root
#

I have used a few hundred gibibytes and that hasn't happened yet

#

Maybe even a few thousand

north holly
#

how does one use that much

loud ice
north holly
#

(tbh idk how much I use)

mortal yoke
loud ice
#

my ISP has "bridge mode" which exports raw ethernet

#

and i can set any mac i want

torpid root
loud ice
#

funnily enough, i can also run tcpdump on my router

dense steppe
#

is your router connected directly to an external cable or is there some kind of modem that it goes through?

loud ice
#

and you can see some managment traffic for other customers ๐Ÿ’€

dense steppe
loud ice
#

because the thing on the wire is not ethernet

torpid root
loud ice
dense steppe
loud ice
#

and if you dont have your own shit you can use it as a router as well

#

but its kinda shit anyway

dense steppe
#

anyway why tf are we discussing networking in this channel?

gentle peak
#

update finished, on qemu 9.2.0 i still get 12M/s

dense steppe
#

so it's a me skill issue

torpid root
dense steppe
flat badge
slim panther
gentle peak
#

but it's based on the smp safe version

#

(the single core version doesn't exist anymore)

#

the normal (smp-safe) version gets 7.2-7.6M

#

the context got a bit buried under all the networking talk

flat badge
#

Does simd in the kernel actually improve perf for uacpi? I would have guessed that not a lot of acpi ops benefit from simd

gentle peak
#

it's not a huge impact but it's definitely there

flat badge
#

Ah, interesting

#

yeah, 12M is quite impressive ๐Ÿ˜„

gentle peak
flat badge
#

Btw infy, is there some acpi implementation in a VM that is more involved than the qemu one? Asking because by now all (?) OSes in the top list finish init in 0ms meme

gentle peak
hollow elm
#

virtualbox isn't any more advanced ```
uacpi-info: successfully loaded 2 AML blobs, 2365 ops in 0ms (avg 3077535/s)

fiery turtle
fiery turtle
hollow elm
#

qemu's also at ~2K ops?

fiery turtle
hollow elm
#

wasn't it 19xx?

flat badge
fiery turtle
hollow elm
#

the solution is to just have some baseline computer everyone tests boots their os on :^)

fiery turtle
flat badge
#

yeah that'd be annoying

fiery turtle
#

How is davids cpu so slow tho๐Ÿ’€

gentle peak
#

hmm

#

does 86box have anything that supports acpi?

#

or some other "real" emulator

hollow elm
#

86box doesn't have anything 64-bit iirc?

gentle peak
#

didn't think of that yeah

hollow elm
#

it goes up to P3 iirc

#

and they just don't think it makes sense to do anything more modern than that

fiery turtle
#

You can add tons of pcie root ports and stuff to qemu

#

That will add extra aml objects

#

Same goes for CPUs, hotpluggable ram slots

gentle peak
#

with -smp 4 proxima gets ~6.3M/s

#

i wonder if that'd improve if i moved smp init to after acpi init

#

yes it does

#

i now have the same performance regardless of cpu count

#

interesting

#

(up to nproc/2 that is, because once i go above that one of the uninitialized aps gets scheduled onto the same physical core as the bsp)

flat badge
#

APs (or qemu vcpus) that sleep shouldn't really impact perf though

gentle peak
#

i'm using limine for smp init so uninitialized aps are in a spin loop waiting for a field to be set

#

they're not really sleeping

flat badge
#

ah yeah, that obviously has an impact

#

limine could use mwait :^) @vagrant hull

gentle peak
#

this is the normal proxima image

#

x86-64-v0, no tricks

flat badge
#

but larger aml blob

#

this probably makes sense

loud ice
#

less time loss on all the one-time setup

flat badge
#

since uacpi will be in L1 cache already for a greater fraction of the running time etc

gentle peak
#

can't really measure the one-time setup cost on qemu but if i simulate the cache part by initializing uacpi multiple times it only gets up to 8.0M

dense steppe
gentle peak
#

5800x yeah

dense steppe
#

probably tuning or interference (but lots of cores on the 7950X3D, so that is unlikely)

gentle peak
#

i've done like 0 tuning on this system

dense steppe
#

maybe the 5800X has better single-thread performance
but probably no

hallow marten
#

your cpu is just bad

#

give it to me

dense steppe
#

yeah sure meme

gentle peak
#

there's only one performance-related thing that isn't default on my system and that's ram speed (it's set to the rated 3200MHz instead of the default 2133MHz)

dense steppe
#

well my ram is like 5600MHz iirc

#

so that's not it

hallow marten
#

let's start a laptop company and make firmware with huge aml blobs

#

the official OSDEVโ„ข๏ธ laptop

dense steppe
#

yeah

#

one target system to rule them all

gentle peak
median crest
gentle peak
#

it's fun

median crest
#

Fair

fiery turtle
#

This is like close to a lot of real desktops

vagrant hull
#

i will look into doing that

dense steppe
hasty plinth
dense steppe
#

true

#

although I haven't noticed any wonky performance characteristics

#

maybe I should try running it with CPU pinning

#

(however one would set that up)

hasty plinth
#

Disable some cores in firmware halfmemeleft

hasty plinth
dense steppe
hasty plinth
#

Yeah that was my understanding

dense steppe
#

no but in all seriousness, I don't think it matters. like at all.

hasty plinth
#

Fair enough

calm latch
#

I think 3D cache cores run on a slower clock though

#

(next step: hobby OSes casually getting heterogenous multi-core support because of uACPI benchmark trl)

gentle peak
#

wouldn't matter for uacpi benchmark since it's done in qemu and when in a vm it's all transparent to the guest

calm latch
#

Didn't Windows have some drama with its scheduler?

dense steppe
#

why would they do that?

calm latch
#

Because Zen 4 cache impedes cooling

#

So the cores have to run slower

#

I think it was changed with Zen 5, where they flipped the chips

#

So you have 8 cores with fast clock and 8 cores with a lot of cache

#

And they were doing some weirdness, like disabling half the cores in games

#

Because Windows' scheduler was dumb

#

I think it was improved in 24h2?

dense steppe
#

I hardly ever reach top clock speeds anyways, unless I am compiling something :^)

calm latch
calm latch
dense steppe
#

idk

#

I have a dual-boot setup (although it's been a while since I last booted windows)

#

I've never noticed any issues

calm latch
#

Like my PC ramps the fans up when I open vscode, even though it's mostly single-threaded, because it boosts one core

dense steppe
#

but again, workload

#

any gaming I do is usually limited by my GPU as well :p

fiery turtle
#

uACPI previously had slightly hacky if (ctx->skip_else) in order to detect whether it should skip an arbitrary ElseOpblock.
In order to make IfOp skipping during table loads and stuff more nice (+ skipping stray ElseOp) i microcoded both to no longer depend on global ctx state:

UACPI_OP(                                                        
    IfOp, 0xA0,                                                  
    {                                                            
        UACPI_PARSE_OP_TRACKED_PKGLEN,                           
        UACPI_PARSE_OP_OPERAND,                                  
        UACPI_PARSE_OP_IF_NULL, 1, 4,                            
            UACPI_PARSE_OP_EMIT_SKIP_WARN,                       
            UACPI_PARSE_OP_SWITCH_TO_NEXT_IF_EQUALS, 0xA1,       
            UACPI_PARSE_OP_END,                                  
        UACPI_PARSE_OP_IF_FALSE_OBJECT, 1, 3,                    
            UACPI_PARSE_OP_SWITCH_TO_NEXT_IF_EQUALS, 0xA1,       
            UACPI_PARSE_OP_END,                                  
        UACPI_PARSE_OP_INVOKE_HANDLER,                           
    }                                                            
)                                                                
UACPI_OP(                                                        
   ElseOp, 0xA1,                                                 
   {                                                             
       UACPI_PARSE_OP_TRACKED_PKGLEN,                            
       UACPI_PARSE_OP_IF_SWITCHED_FROM, 0xA0, 0x00, 3,          
            UACPI_PARSE_OP_SKIP_WITH_WARN_IF_NULL, 1,            
            UACPI_PARSE_OP_INVOKE_HANDLER,                       
   }                                                             
)                                                                
#

instead IfOp now just skips directly to ElseOp if it exists after the If block, and Else on its own skips itself by default unless it was invoked via If

kindred beacon
#

AML microcode???????

mortal yoke
#

its actually a nice way to parse aml, I also stole that idea from uacpi to my aml interpreter

mortal yoke
#
res[LoadTableOp] = {7, {
    Op::TermArg,
    Op::TermArg,
    Op::TermArg,
    Op::TermArg,
    Op::TermArg,
    Op::TermArg,
    Op::CallHandler
}, OpHandler::LoadTable};
res[BankFieldOp] = {8, {
    Op::PkgLength,
    Op::NameString,
    Op::NameString,
    Op::TermArg,
    Op::Byte,
    Op::StartFieldList,
    Op::FieldList,
    Op::CallHandler
}, OpHandler::BankField};
fiery turtle
mortal yoke
#

yeah I don't really have any kind of control flow or anything

fiery turtle
#

non turing complete microcode TheVoices

#

how many lines is your interpreter btw?

fiery turtle
#

idk

#

ray tracing or x86 emulator

loud ice
#

i wonder what's the performance penalty for this microcode

loud ice
#

clearly

mortal yoke
#

the fields are slightly weird with how I did them, basically the StartFieldList pushes a fieldlist object to the object stack that contains the frame that the fields are within and then the FieldList op parses one field from the frame at a time until the frame is consumed (and sets the op block context's processed flag to false which makes it return keep processing that same FieldList op instead of continuing to verify it and get the next op, though in case of connectfield it actually parses the buffer/object in the middle on a new ctx before returning back to parsing the fields)

mortal yoke
fiery turtle
#

damn

#

uACPI's was smaller before I added esoteric field stuff

#

rn its at 6000

#

at least my local copy

mortal yoke
#

to be fair things like this add a lot of lines

fiery turtle
#

yeah i have stuff like this too

#

although this would be handled in microcode for me

mortal yoke
#

reminds me that I should really refactor that ObjectRef to instead default construct as empty, its kinda weird to use if it by allocates by default and then you have to check if it failed (and if you want to construct an empty non-allocated one then you have to use ::empty()) KEKW

#

its just another huge painful thing to do because it has billions of uses

fiery turtle
#

lol

frank canopy
#

sometimes I wonder how a fully zig acpi library would be and then I'm like heck no I don't actually want to have to make that to find out

#

zig has good enough c interop that uacpi is painless enough that it wouldn't be worth

fiery turtle
#

lol

#

i mean u can give it a try for some tiny aml subset

#

like math stuff

#

AML is simple: 0 + 1 is encoded as AddOp 0x00 0x01 trl

#

trust

#

the rest is this ez too

mortal yoke
#

I mean most of it is not that bad

fiery turtle
#

yeah

#

AddOp AddOp AddOp ... trl

frank canopy
#

lol

#

I was actually in the middle of starting one when I found out about uacpi

#

might revisit at some point

fiery turtle
#

its a fun exercise for the most part

#

dont do references tho ๐Ÿ’€

frank canopy
#

lol

mortal yoke
#

yeah the semantics are something I don't really understand to this day lol

#

and specifically the nt compatible ones

#

I just looked at uacpi and twiddled with it enough so it passes the tests

fiery turtle
#

I did understand it entirely while implementing it but I no longer remember anything becaues its very counterintuitive

frank canopy
#

the actual spec being a partial lie because of nt compat is what disillusioned me from the whole doing it in zig project

fiery turtle
#

yeah acpica violates it quite a lot too

#

so the truth is somewhere in the subset of both

mortal yoke
#

tbh playing with nt giving it different kinds of cases could help understanding them but idk how exactly do I even pass aml blobs to nt lol

fiery turtle
#

i had to do sooo much of that

fiery turtle
# mortal yoke tbh playing with nt giving it different kinds of cases could help understanding ...
  • install com0com (virtual com driver)
  • install comByTCP
  • start comByTCP at COM3
  • run windbg -k com:port=com4,baud=115200
  • qemu-system-x86_64 -M q35 -hda windows.qcow2 -serial tcp::4445,server,nowait -m 4G -smp 8 -acpitable file="..\..\uACPI\tests\reftest.aml" -accel whpx -L "C:\Program Files\qemu\share"
  • connect to the debugger with windbg
  • !amli set traceon dbgbrkon errbrkon spewon;g
  • wait for Acpi.sys to get to your AML
frank canopy
#

wait can't you run named pipes from qemu?

#

or is the tcp to escape wsl with it

fiery turtle
#

idk if u can do that on windows

frank canopy
#

I'm pretty sure you can

fiery turtle
#

but anyway this works for me after 20 hours of setting it up

#

so i aint touching it

frank canopy
#

I went looking for that at some point

#

and that's 100% fair

mortal yoke
fiery turtle
#

i've tried just TCP and online guides suggested running two vms and stuff

#

i couldnt get anything to work but this

#

and it was very very painful to do

frank canopy
#

oof

fiery turtle
#

this requires disabling secure boot

#

because com0com isnt signed for secure boot

#

but it works on normal windows tho

frank canopy
#

my instinct would def be named pipes but something working is better than trying other things

#

aint broke dont fix and all that

fiery turtle
#

if you could show me how to do it with pipes id give it a try too

#

im not sure if windbg has a mode like that tho

gentle peak
#

iirc on windows you have to use a path like \\.\pipe\<name>

frank canopy
#

yep

winter orbit
gentle peak
#

but I don't know the specifics of how to set it up with qemu

frank canopy
frank canopy
#

or when you pass pipe through to a guest serial

#

because the latter is whats used here

#

qemu's chardev in theory does named pipes

winter orbit
#

this is a very old issue

fiery turtle
fiery turtle
#

๐Ÿ’€

frank canopy
#

again is this for the qemu built in debug or for the named pipe serial/chardev?

#

is there a difference?

winter orbit
#

this is for pipe serial/chardev

frank canopy
#

RIP

winter orbit
#

The issue is how Windbg handles its pipe communication

#

qemu just explodes

#

works with putty though

frank canopy
#

ah that sounds about right then lmao

gentle peak
#

wouldn't you be able to work around the issue by using -serial stdio and redirecting stdin and stdout to the pipe

winter orbit
#

it'll still be too much unless you force windbg output to be sub 4000~

#

iirc

frank canopy
#

damn

gentle peak
#

that's annoying

frank canopy
#

yeah that really sucks

winter orbit
#

The proper solution would be rewriting that file a bit to use OS specific events

#

I;m lazy though

#

Ah anyway;
if you grab that hack and recompile qemu itll work fine but I feel like that's a pain and what @fiery turtle does now is far better and more stable

frank canopy
#

yeah if you can just make something other than qemu handle the serial port then its fine

#

oh god i went to read the source for combytcp and that was a fuckin mistake

#

why is this visual basic written like its 3-5 years older than it is

#

(well ig it probably actually is tbh)

#

but dear lord

#

anyway i could probably make a tcp-named pipe adapter in less than an hour to save having to do the com0com bit

#

might even do that after breakfast, take a refresher from all this osdev with some nice high-level c#

mortal yoke
#

I think I managed to get windbg working on linux with two vm's, though its painfully slow (and prints like 3 asl lines in a second in windbg) ```
host (used to run windbg connected to com1)
qemu-system-x86_64 -m 6G -M q35 -cpu qemu64 -smp 4 -drive file=win10-main.qcow2,media=disk,if=none,id=ide-disk -device piix4-ide,id=ide -device ide-hd,drive=ide-disk,bus=ide.0 -enable-kvm -serial tcp::4445,server,nowait -name WinMain -vga virtio
debuggee (configured with bcdedit /debug on; bcdedit /dbgsettings serial debugport:1 baudrate:115200):
qemu-system-x86_64 -m 6G -M q35 -cpu qemu64 -smp 4 -drive file=win10-debug.qcow2,media=disk,if=none,id=ide-disk -device piix4-ide,id=ide -device ide-hd,drive=ide-disk,bus=ide.0 -enable-kvm -serial tcp:127.0.0.1:4445 -name WinDebug -acpitable file=~/Projects/uACPI/tests/bin/to-integer.aml

fiery turtle
mortal yoke
#

is it also supposed to have some extra stuff printed? because I don't think a lot of the stuff its printing was within the to integer table that I tried to give it

#

like pci stuff and whatever

fiery turtle
#

and only then this thing

mortal yoke
#

ah that explains it

#

its going to take ages to get there tho lol

fiery turtle
#

maybe its even slower for u than it is for me

#

mine takes maybe a minute to get to my tables

#

acpi.sys is slow af i guess lol

frank canopy
#

the dbg might slow it down too

mortal yoke
#

yeah all the printing and decompilation probably does

#

especially as with two vm's as it has to first go to the host from the first qemu then from there to the second qemu over tcp and from there qemu feeds it to the guest

fiery turtle
#

yeah i mean makes sense

frank canopy
#

well it took slightly longer than an hour to make a named-pipe/tcp bridge because i kept getting interrupted and im too lazy to test it in general but upsides it might actually work on non-windows ig lmao

fiery turtle
#

we need to make like a guide for both approaches because its very easy to forget, and your option might be better because secure boot can still be on

frank canopy
#

passing --pipe:xyz means giving windbg com:pipe,port=\\.\pipe\xyz

fiery turtle
#

Wtf you actually made one from scratch?

frank canopy
#

and it can act as either tcp host or client

#

yeah

fiery turtle
#

Damn

frank canopy
#

took around an hour ish

fiery turtle
#

Well done

frank canopy
#

ive been using c#/dotnet for over half my life i can almost do it in my sleep now lmao

#

and as i said untested

fiery turtle
#

Need to test if it works ig

frank canopy
#

the idea is qemu still does tcp and you just use this and a named pipe on windbg instead of com ports and com0com/combytcp

fiery turtle
#

Big

#

Lol

#

Ill definitely try it

frank canopy
#

thank goodness for dotnet having "copytoasync" for streams lol, def made this easier

#

can just tell the tcp socket and named pipe to copy to each other and be set

#

oh wait fuck im stupid hang on

#

rn its copying the same direction twice instead of both directions

#

i dont have a windows virtual machine or windbg set up rn or id try it directly lol

#

it even handles ctrl-c to exit gracefully (lets ctrl-break through to just have the os kill it though)

#

(and a second ctrl-c will get passed through to the os to kill it too)

fiery turtle
#

Nice

slim panther
frank canopy
#

its a good language for high-level things

#

idk if yall know cosmos but thats how i got into osdev even

#

jankest thing ever though

#

much prefer doing it all manually now

#

anyway please do let me know if the PipeByTcp thing works out if any of yall try it, hopefully it does so figuring out how winnt does acpi is a bit easier

vast kestrel
#

Come and help with tomatos then Smuggy

frank canopy
#

ive done low-ish level interop in c# before even recently i have no more interest in using it in osdev lol

fiery turtle
#

only chosen ones will remember it was born as an acpi library for the ultra os

dense steppe
#

great, now prune all references to UltraOS from history and you are done

fiery turtle
#

i dont think there were any meme

rustic compass
#

There are some

fiery turtle
#

really?

rustic compass
#

In uacpi-rs

#

Submodule

fiery turtle
#

F

rustic compass
#

Maybe we should move that there too

fiery turtle
#

yeah im not sure how long that redirect is going to work for

rustic compass
#

Also I mean that we could move uacpi-rs to uacpi/

fiery turtle
#

ohhh

#

that would be cool definitely

rustic compass
#

So that that rs version is by definition the only true api wrappermeme

fiery turtle
#

sure

#

I can even link it in the readme once its complete

rustic compass
#

once

fiery turtle
#

how much is there left ultrameme

rustic compass
fiery turtle
#

lol

rustic compass
#

Types.h mostly done

fiery turtle
#

thats probably the biggest

#

well resources.h also but thats just structs

rustic compass
#

Most other stuff is done fast, but the types things was annoying sometimes

fiery turtle
#

makes sense

rustic compass
#

Did a few type safety crimes

fiery turtle
#

lol

#

like which

rustic compass
#

transmute rust slice to uacpi slices

#
  • transmute on generic structs
fiery turtle
#

ah

#

do I need to add u as a member so u can transfer?

rustic compass
#

Probably never moved a repository around

#

Can try it in 12h need some sleep

fiery turtle
#

settings, scroll down, red button called move or whatever

#

yeah sure no rush

rustic compass
#

Also I will update to your newest commit to see if they break win clangtrl

vagrant hull
#

unless you make another repo with the same name as the old one

#

then it's gone

fiery turtle
#

ah cool

slim panther
#

@fiery turtle the acpi memes continue

#

iASL Warning: There were 155 external control methods found during disassembly, but only 667 were resolved (4294966784 unresolved).

fiery turtle
#

Least retarded uACPI bug

#

(this is in my WIP PR dw)

dense steppe
#

yeah, doing it on one line is unspecified because the order of evaluation is not defined

fiery turtle
#

yeah idk what i was thinking

#

thanks to asan for breaking this order

#

because it was working without it

slim panther
fiery turtle
#

no broken aml should break the disassembler

dense steppe
#

it's tricky to know when it is and isn't allowed to depend on evaluation order

#

I tend to only depend on evaluation order in cases like ```c
if (obj && obj->somebool) {
// ...
}

slim panther
fiery turtle
#

re-read their msg lol

dense steppe
#

and if your compiler says otherwise, go shopping for a new compiler

slim panther
#

true

#

can i load patched dsdts outside of the initrd

#

i kinda don't want to have to regenerate my initrd on every update

fiery turtle
#

No idea

dense steppe
#

so you don't have filesystems yet

fiery turtle
north holly
#

as a tribute

#

to the old uacpi link

fiery turtle
#

Lol

north holly
#

anyway gtg make me NIC driver support receiving packets

fiery turtle
#

Letsgo

#

What are the next plans after that

north holly
#

network stack

#

should be fun

fiery turtle
#

Yeah no

north holly
#

I'm sure it'll be fine trl

#

if I end up not being able to understand anything, I will use lwIP

fiery turtle
#

Full TCP impl is like 10k loc probably

north holly
#

nvm

#

yeah lwIP's TCP implementation is 6k+ loc

fiery turtle
north holly
#

I don't believe it's too hard to port

fiery turtle
north holly
#

neither do I

calm latch
dense steppe
#

but in some cases,
it is better to be safe than to be sorry

vagrant hull
#

@fiery turtle btw remember to update the copyright date to 2025 before 1.0

#

in LICENSE

fiery turtle
#

Right

#

Thx

vagrant hull
#

np

frank canopy
#

well looks like i might actually be able to test the PipeByTcp thing myself at some point given i need to install windbg to figure out this dang bugcheck my laptop keeps doing lmao

#

probably gonna be too lazy still though

median crest
#

Write your own tcp stack

flat badge
#

A simple but compliant tcp implementation is not that big

#

It becomes more messy if you want to support difficult congestion control algorithms and all the TCP options etc

loud ice
#

you only really need one congestion control algorithm

flat badge
#

Right, but a generic tcp implementation will probably give you more than one to chose from and hence it'll be larger than a simple implementation

loud ice
#

yeah

flat badge
#

One thing that's also more complicated than a basic implementation is a proper SACK implementation

loud ice
#

true

#

hmm

vast kestrel
#

Just make a stop and wait tcp

#

Window is optional

loud ice
#

how hard is SACK, really

#

bad for performance

#

i will have CUBIC in my bootloader.

#

or maybe not idk

#

probably will tho

loud ice
flat badge
loud ice
#

when you want to read more bytes, you wait for a tcp packet that contains the next frame

#

and ack it immediatly

#

if you want to write more bytes, you send the frame every 1ms until you get an ACK back

#

congestion control is boring anyway meme

flat badge
#

okay, but that is extremely stupid and relies on retransmission

vast kestrel
#

Yeah lol

#

Like you can do it, it's extremely simple, but any PL or reorder destroys the perf