#Nyaux

1 messages ยท Page 39 of 1

thorn bramble
#

i forgot you HATE definining local variables

surreal path
#

@flat nymph u trying the iso now

flat nymph
#

Which

surreal path
#

^

flat nymph
#

I think this tripple faulted

#

I'mma try it again

surreal path
#

try

#

if it triple faulted too

#

ur machine just is racist towards nyaux

#

osism

flat nymph
#

2 machines

#

Or Nyaux has some skill issue with AMD

kind root
surreal path
flat nymph
#

yeah

surreal path
flat nymph
#

fucked nuyaux

#

then flashed my pc

surreal path
#

๐Ÿ’€

#

๐Ÿ’€ ๐Ÿ’€

flat nymph
#

doesn't tripple fault trl

surreal path
#

so @thorn bramble theory is probs right

flat nymph
#

I have serial port

#

So

#

remove flanterm

#

Write to that

surreal path
#

framebuffer is probs above 4GB

#

k

thorn bramble
#

pmos works tho

#

ยฏ_(ใƒ„)_/ยฏ

flat nymph
#

pmos doesn't use hhdm

#

temps mappings for everything

#

and framebuffer in userspace

thorn bramble
#

ah i see

#

yeah it is probably that lol

#

i am a genius

flat nymph
#

although I've also had some skill issues with framebuffer on other PCs

thorn bramble
#

(hopefully)

surreal path
#

ok try and check serial port

surreal path
# thorn bramble (hopefully)

well im happy its not a problem with my code (it is in that i die if the framebuffer is outside 4gib but fuck u)

flat nymph
#

limine does work though

#

and it should be using hhdm (?)

surreal path
#

i dont know ask mint

flat nymph
#

as in limine gives picture

surreal path
#

i didnt make limine

flat nymph
#

the serial is quiet

#

but it's not tripple faulting

#

Can you set lower baud rate?

surreal path
#

it should not be

#

k hold on

flat nymph
#

one of the PCs seems to be having a serial port skill issue

thorn bramble
#

make sure you aren't using ft_ctx anywhere anymore

flat nymph
#

or both

#

I have a third PC

flat nymph
#

But I'm using it as a server...

surreal path
#

sprintf only prints to serial

flat nymph
#

So without it home dumb

surreal path
#

okay i set both dlab registers to 0x03

#

i dont know how much that is in baud rate

flat nymph
#

I don't see you waiting for buffer to be empty

kind root
#

just set a slower baud rate

#

to prevent cable skill issue

surreal path
flat nymph
surreal path
flat nymph
#

But it's having skill issue on pmOS with 9600

surreal path
flat nymph
#

But that PC has a 12 years old Aerocool PSU

#

(fire hazard)

#

Idk how it survived that long

#

@kind root probably knows

#

What I'm talking about

kind root
#

lol

surreal path
#

lets do the math

#

so 0x3 is 11

flat nymph
#

13

#

At least that's what I have set in pmos

#

Maybe that's why it's not working

surreal path
#

for both dlab registers?

#

significant and least signicant

#

?

#

or not

flat nymph
#

?

#

No

#

Idk

#

Ask chatgpt

#

It probably knows

surreal path
#

what

#

how does it know ur code

#

what

surreal path
flat nymph
#

lol my drawer has some interesting finds

surreal path
#

can isee ur serial init code

kind root
surreal path
#

nvm

flat nymph
#

it's the same as yours

#

but ask chatgpt

#

mine is also half broken

surreal path
#

its now 9600 baud

flat nymph
#

and I can't find the third serial lead nooo

surreal path
#

9600 baud

flat nymph
#

chatgpt says it's 12 btw

#

ates thind!KEKW

surreal path
flat nymph
#

d its me

surreal path
#

anyways now its not a bug trl i can go back to WORKING ON ROUTE IRQ

#

IN PIECE

#

PEACE

#

@kind root most stable framebuffer

#

(its a bug not a feature nyaux does not support above 4gb framebuffers)

flat nymph
#

ask @wicked loom

surreal path
#

ask her what

#

lol

flat nymph
#

why flanterm no work on my pc

surreal path
#

play cs2

#

with @bleak cedar

flat nymph
#

Ok it was a PSU issue hi world its me nyaux hates this framebuffer land!

#

@surreal path can you install idt before flanterm, and try to initialize it?

surreal path
#

k

#

oh yeah

#

nyaux is way faster when not printing shit

#

like

#

WAY

#

faster

#

on tcg btw

#

anyways

#

go and try ig

kind root
surreal path
#

๐Ÿ˜ก

kind root
#

fair

flat nymph
#

I think I need a PXE server

#

And I could log to network in pmOS

#

This should probably be the easiest thing to implement

#
                                                   kmain(): Hello World ITS THE HERE
                                                                                    DEMOUS LAST WORDS HERES FUNNY NUMBOW WE USPRINTF 69420
                                                                                                                                          Welt loadednit(): idt loade: The HHDM is 0x
                     (): Freepmm_init(): Free6752694
                                                    80000000mapping 0xffff800000000000 to ffff800100000000 : phys 0x0 to 0x100000000vmm(x86_64)(): Above 4Gib Mapped! Mapping Memory Map!
                         vmm(): H000000
                                        length: 872448
                                                       next: 0x0
                                                                }
                                                                 vmm(): Kernel is now in its own pagemap :)
                                                                                                           vmetup!
                                                                                                                  get_symbols(): found elf signature ELF
                                                                                                                                                        kpder: type 0
     get_symbols(): Nyaux Symbol Resource Created and Stored on Heap
                                                                    init_acpi(): initing uacpi
                                                                                              uacpi: RSDP 0x00000000CA8B8014 00000024 v02 (ALASKA)
                                                                                                                                                  uacpi: XSDT 0x00000000CA8B7728 000000EC v01 (ALASKA A M I   )
                                               uacpi: DSDT 0x00000000CA89C000 0000B767 v02 (ALASKA A 038 v01 00CA7A7000 0000003C v01 (ALASKA A M I   CA7A6000000006E v02 (AMD    AmdTable)
                          ua(AMD    00000000E v02 (AMD    Ar ```
surreal path
#

wel

kind root
#

nyaux forgot \r\n

surreal path
#

i did not

#

๐Ÿ˜ก

kind root
#

\r as well?

surreal path
#

i dont do /r lol

#

just /n

flat nymph
#

I think my PCs now hate me for booting Nyaux on them

surreal path
#

lol

kind root
surreal path
surreal path
flat nymph
surreal path
tawdry mirage
flat nymph
tawdry mirage
#

not sure if you can tell screen to do that but ```
$ stty -F /dev/ttyS0 speed 115200 raw nl
$ cat /dev/ttyS0

surreal path
#

i dont support 32 bit hpets

kind root
#

its normal to triple fault?

surreal path
#

so nyaux didnt triple fault from the serial info it seems

#

no]

#

there is an idt installed so if we were abt to even fault

#

it would have been caught

#

idk why it didnt

#

but not my problem idc i dont support framebuffers over 4gib

#

:^)

#

i dont want to think about it i dont hear you lalalalala

flat nymph
#

It could still be a you problem

surreal path
# flat nymph

prints all this then triple faults? not my problem

surreal path
#

if it panicd

#

its fine

kind root
#

doubt

surreal path
#

do not try to make me die from pain trying to debug something for hardware i dont support

#

i.e framebuffers over 4g

#

i do not care i do not want to deal with it and it runs on most hw fine anyway

flat nymph
#

This PC's memory map

#

Framebuffer is at 0x7C00000000

surreal path
flat nymph
#

At 534GB

#

Because why not

surreal path
#

yea thanks whoever made ur mobo

#

:)

#

amazing place to put a framebuffer btw

#

:)\

edgy pilot
#

I don't think that's the case with newer versions

#

just memmaps and kernel

kind root
kind root
#

so the bios obviously allocated it higher

surreal path
#

like a chocolate bar?

#

like u eat it?

#

nom nom?

cinder plinth
#

Base address register

silver yarrow
#

brainrot

surreal path
#

nyaux will infect ur pc

edgy pilot
#

with brainrot

surreal path
#

whats the difference between edge leveled triggered interrupts

#

and level triggered interrupts

molten grotto
surreal path
kind root
#

no

surreal path
#

oh

#

should i default it to level triggered?

molten grotto
#

for isa irqs the default is active high + edge iirc

#

then if there is an override you take whatever the override specifies

molten grotto
#

but it also depends on what exactly you are configuring, for eg. the acpi sci the default is active low + level

molten grotto
#

the interrupt that uacpi installs

surreal path
#

oh okay

#

whats intr init, extint etc etc

#

i know what smi is

#

but anything else of this

#

is there an sdm page/chapter that describes that these signels are?

molten grotto
#

probably but for the io-apic you don't really need any of the others than fixed (or maybe lowest priority if you want)

surreal path
#

okay

molten grotto
#

and maybe nmi if you want to create some sort of watchdog that interrupts the cpu regardless whether interrupts are enabled or not

surreal path
#

is it important to know what these signels are?

molten grotto
#

likely no at least at this stage

surreal path
#

okay

#

did we just

#

...

#

fault

#

nvm

#

wait not nvm

#

why did he fault

#

this vm run?

#

weird

#

time to test the vm 15 times

#

tested it 15 times

#

no fault

#

weird

#

@molten grotto is extracting the flags like this correct?

#

from the isos

#

also they are all zero for some reason

#

i think thats correct?

molten grotto
#

polarity is low 2 bits, trigger is the next 2 bits after that

surreal path
#

101 is init

molten grotto
#

the override flags don't encode anything else than polarity and trigger

surreal path
#

same with trigger

#

cant they just be one bit each

molten grotto
#

well there are also some special values

surreal path
#

OHHHH

#

that makes sense

surreal path
#

thanks

surreal path
#

second is none

#

so no override map as ud like

surreal path
#

this is genuinely so cringe but idc

surreal path
# molten grotto

acpi follows a pattern thats similar to the apic bits so im doing this

molten grotto
surreal path
#

oh yeah

#

im bitshifting the wrong way everywhere

#

its <<

#

not >>

#

nvm im not

#

56 not 32 whoops

#

most normal nyaux code

#

lit repeated code

#

fuck why is polarity reversed

#

code

silver yarrow
#

brother

surreal path
#

how is thing 0b10

#

yes borther

#

brother

#

what is up brother

#

@silver yarrow ??

silver yarrow
#

nothing just that the code is uhhh

#

great

surreal path
#

i know its shit

#

im just trying to speedrun ioapic rn

silver yarrow
#

hey you said it

surreal path
#

it is true

surreal path
#

so if thing is 0

#

why is it 0b10

#

signed bit?

#

no?

silver yarrow
#

its.. not

#

if its 0 then its 0b00

surreal path
#

so why tf is it return -1

silver yarrow
#

wtf is %b

#

sec

molten grotto
#

binary print

surreal path
#

%b binary

silver yarrow
#

thats not standard is it

surreal path
#

no

molten grotto
#

its after c23

#

anyway try fixing the ub within that fn to see if it makes any difference

surreal path
molten grotto
#

you don't return anything at the end

surreal path
#

oh yeah

silver yarrow
#

wait yeah u literally dont return anything for the zero case

#

๐Ÿ’€

surreal path
#

well i fixed ub

#

now it died

#

now we are stuck?

molten grotto
#

when would checker be null

surreal path
#

did it call itself

surreal path
molten grotto
#

you always set it to be address of isos[i]

#

that can never be null

surreal path
#

fair

#

ill js check if i is not 16

#

well my bad

#

looks like theres a null deref

#

shouldnt happen tho

molten grotto
#

do you have it mapped

#

it looks like you don't

surreal path
#

yes

#

i have mapped it

#

and already read one of the registers

molten grotto
#

weird

surreal path
#

yea and there is no iso

#

for irq 1

#

and it said it found something

#

cringe

#

hold on

#

i think i know what it is

#

okay i solved some skill issues

#

lemme solve some more skill issues

#

i think i solved it

#

nvm pressing the keyboard is doing nothing

#

@molten grotto how to check ioapic logs from qemu

#

is there like a way to do tghat

molten grotto
#

there is some trace

#

iirc, maybe -trace "*apic*"

surreal path
#

yea no delivered interrupts for irq 1

#

this should be correct

#

hold on

#

i solved the if statement that didnt solve it

#

hmmmmmmmmmmmmmmmmmmmmmmmmmmmm

#

gave this parathisis

#

didnt fix it

#

hmmmmm

#

yall have an idea

#

like any idea as to why its not working?

#

im going to manually try to map irq 1 in populate ioapic

#

and see if its the function

#

manually mapping it doesnt work either?

#

@molten grotto am i doing something wrong here?

#

im just manually trying to map the irq at this point

#

and it doesnt work

surreal path
#

is the bit shifting in correct?

#

incorrect*

#

it doesnt look incorrect

#

thats assembled data in binary

#

ummm

#

why does it look like that????????????????????????

#

control value

#

i turned off bit 11

#

no change

#

value in binary

molten grotto
#

how do you know that its not working?

surreal path
#

pressing keyboard does nothing

molten grotto
#

you can look at info pic to see the status of it

surreal path
#

no interrupt is sent

#

k hold on

molten grotto
#

(in qemu monitor)

surreal path
#

its all masked

#

qwinci i think the ioapic hates me

tawdry mirage
#

true!

surreal path
#

yes!

#

bro the ioapic is such a simple device

#

how tf did i fuck this up

kind root
#

Indeed

surreal path
#

๐Ÿ’€

surreal path
#

so if everything is masked

#

its either

#

the ioapic is refusing to accpet my values

#

or the registers are wrong

#

which they arent at least

kind root
#

Show ioapic write

surreal path
#

k

kind root
#

Looks like you're writing zeroes

surreal path
#

thats not me?>

#

its just spamming this

#

regardless

kind root
#

Who else

surreal path
#

idk but it spams it even when booting up the vm

molten grotto
surreal path
#

oh

#

i forgor

#

๐Ÿ’€

molten grotto
#

it literally doesn't do anything lol

#

it just loads some random value from some random addr and discards it

surreal path
#

it worked

#

but pressing the keyboard does nothing chat, maybe the keyboard queue is full?

#

ps2 keyboard*

#

time to test route irq function

kind root
#

U can test it via a fixed event handler

surreal path
#

oh thats completely wrong?

surreal path
kind root
#

Like an acpi interrupt for the power button

#

Irq 9

surreal path
#

k hold on

kind root
#

If u install the handler first ofc

surreal path
#

i just report success to uacpi

kind root
#

Well route it properly

surreal path
#

seems we have a bug with the scanning of the isos

#

oh wait we dont

#

im just stupid

#

hold on

kind root
#

No way

surreal path
#

yea this is garbage code

#

i know

kind root
surreal path
#

this check is failing

kind root
#

What the fuck is it doing

surreal path
#

checking for the ioapic we need to use to route the irq

kind root
#

๐Ÿ’€

surreal path
#

yea

#

really stupid

#

but it should work

kind root
#

Most readable nyaux code

surreal path
#

nah this is probs the worst nyaux code ive written

#

i just want to this work lol

kind root
#

Why dont u clean it up

#

You're speedrunning it

surreal path
#

cause i wanna write ec so bad

finite summit
#

bro I thought obos code was unreadable (it is)

kind root
#

โ˜ ๏ธ

surreal path
#

ioapic is BORING ๐Ÿ˜ก

#

/j

finite summit
#

yet required for the EC...

surreal path
finite summit
#

and trust me, EC is boringer

surreal path
#

sure

finite summit
#

I've made a driver

#

for EC

#

You haven't

surreal path
#

flex

finite summit
#

Trust me it's the most plain shit you can do

surreal path
#

much

#

okay fine ill clean up the if statement

#

is bro stuck

#

or smt

#

thanks ubsan

#

got it working

#

how to make ubsan shut up

#

its not out of bounds?

finite summit
surreal path
#

no

finite summit
kind root
#

Id trust it

finite summit
#

^^

surreal path
#

the shift out of bounds is on purpose?

finite summit
#

why

surreal path
#

16

finite summit
#

I don't need to shift out of bounds for my ioapic code

finite summit
#

also

#

you did it wrong

kind root
surreal path
#

explain

finite summit
#

it's not 16 >> thing

#

lmao

surreal path
#

OHHHHHHHHHHHH

finite summit
#

it's thing >> 16

#

โ˜ ๏ธ

surreal path
#

thanks

#

๐Ÿ’€

finite summit
#

nyaux moment

surreal path
#

truly

#

thanks

#

im happy i added ubsan

#

without ubsan i would be cooked

tawdry mirage
#

also why duplicate the expression instead of using the variable

surreal path
#

ill clean up the code

finite summit
#

unfry it

surreal path
#

lol

finite summit
#

btw, nyauxmaster, people would probably stop seeing your kernel as some cursed mess if you stopped posting a message for each small bug

#

*20 messages

surreal path
#

im sorry i just

#

i dunno

finite summit
#

nah I'm not complaining

#

I'm trying to say, if you always depict your kernel as having infinite bugs, that's how people will see it, if you don't want that, stay more quiet about your bugs

surreal path
#

ill try to

#

but again that will be difficult

finite summit
#

but no one here minds the spam usually

silver yarrow
#

I dont see it as a mess cuz of bugs

#

bugs are normal

finite summit
#

^

silver yarrow
surreal path
#

whats wrong with the sched

#

it is the best sched

#

we love sched

silver yarrow
#

like if it works for you its fine and I am not here to shit on you but to me the code is barely readable

finite summit
hexed mango
flat nymph
#

Some variable names are weird sus

finite summit
#

I should read ULE

surreal path
#

whats wrong with e

hexed mango
surreal path
#

and him

#

and hey

surreal path
surreal path
hexed mango
finite summit
#

if you guys want truly unreadable code, go shit on obos instead

silver yarrow
#

and figure out a way to abstract architecture specific code

surreal path
#

using macros

flat nymph
surreal path
surreal path
silver yarrow
#

nightmares

finite summit
surreal path
finite summit
#
static int pnp_pci_driver_cmp(const void* a_, const void* b_, void* udata)
{
    OBOS_UNUSED(udata);
    // NOTE(oberrow): If this fails, gl and have fun.
    const pci_hid* a = &((struct pnp_device*)a_)->pci_key;
    const pci_hid* b = &((struct pnp_device*)b_)->pci_key;
    if (((int8_t)a->indiv.classCode - (int8_t)b->indiv.classCode) != 0)
        return (int8_t)a->indiv.classCode - (int8_t)b->indiv.classCode;
    if (((int8_t)a->indiv.subClass - (int8_t)b->indiv.subClass) != 0)
        return (int8_t)a->indiv.subClass - (int8_t)b->indiv.subClass;
    if (((int8_t)a->indiv.progIf - (int8_t)b->indiv.progIf) != 0)
        return (int8_t)a->indiv.progIf - (int8_t)b->indiv.progIf;
    return 0;
}```
flat nymph
silver yarrow
#

ehhh

#

ig

#

I had one project

#

I did in go

surreal path
silver yarrow
#

20% of the code was bubbling errors

flat nymph
#

You haven't used C++ without exceptions

silver yarrow
#

I dont use C++

#

fuck C++

#

go over c++ any day

surreal path
#

i am indeed

#

fucking nyaux

flat nymph
silver yarrow
#

fair

surreal path
#

๐Ÿ˜ก

silver yarrow
#

though I dont suggest writing a compiler in C. I got pretty far and it is a nightmare

#

lol

finite summit
#

attracted to nyaux

surreal path
#

real

silver yarrow
surreal path
#

YESSS

flat nymph
surreal path
#

girls โŒ

#

nyaux

#

โœ…

hexed mango
surreal path
#

anyways its time for EC??

#

chat

#

just cleaned up the ioapic code

finite summit
#

the only thing I have missed from C++ is RAII

flat nymph
flat nymph
surreal path
#

then figure out how to talk to it

#

then yea

finite summit
#

you have three hobby EC drivers

#

read any of them

flat nymph
hexed mango
finite summit
#

(daily obos shilling complete)

surreal path
flat nymph
#

Wikipedia has an article on it

surreal path
#

okay

finite summit
#

basically it's so that AML can do IO to firmware stuffs

flat nymph
#

Because of that, ChatGPT should also be able to explain it

finite summit
#

and also so firmware can tell you when certain events happen

#

such as laptop lid close/open, battery status, etc.

silver yarrow
#

chatgpt: 20 great articles -> one acceptable article

surreal path
#

oh i seeee

flat nymph
#

Power button

surreal path
#

whats a acpi gpe

silver yarrow
#

ngl I dont understand peoples fascination with turning off a computer

flat nymph
flat nymph
surreal path
finite summit
surreal path
#

oh i see

finite summit
#

stuff like power button press

#

battery status change

#

lid open/close

#

FN key pressed

silver yarrow
#

I find it funny

flat nymph
#

I have uACPI in userspace

silver yarrow
#

based

flat nymph
#

So that's a good test that it's working I guess

surreal path
#

billions will use nyaux

#

once it has EC

#

yall better agree

surreal path
#

ok sure

elder shoal
#

I senrt it in the wrogn thread

#

๐Ÿ˜ญ

surreal path
#

๐Ÿ˜ญ

cinder plinth
#

There's a flag

#

but yeah templates are cool

#

In my kernel I try to avoid classes and templates unless they make sense

#

Like most of the OOP code is scheduler + drivers

wicked loom
#

i have a ghost ping from here

surreal path
#

but they deleted their message

#

sorry about that

rigid fable
wicked loom
flat nymph
#

His flanterm wasn't working on my PC

#

Which maps framebuffer at 523GB

surreal path
#

on base revision 2 yea

surreal path
#

OKAY NO MORE BEING LAZY

#

EMBEDDED CONTROLELR TIME

#

okay this makes sense

#

now how exactly will i talk to it?

#

and initizie it?

#

lets see the acpi spec!

#

oaky this makes sense

#

yoyoyoyo hold up

#

whats an smi

#

@finite summit do u know

finite summit
#

software management interrupt

surreal path
#

oh yeah

surreal path
#

like isnt smi something that shouldnt even be ACCESSED by the kernel

#

plus thats a cpu thing

#

??????????????????????

kind root
#

U can ignore this bit, its for the bios not u

surreal path
#

and sci?

#

whats that

#

exactly

#

oh yeah

#

makes sense

#

okay

#

i see there are 2 modes to the controller

#

is this something i have to worry about @kind root

kind root
#

This is the most important bit

surreal path
#

i see

kind root
#

It tells you the EC wants to run AML

surreal path
#

i see

kind root
#

SCI is what they call the acpi interrupt

finite summit
#

you can take my ec driver as a reference

#

(obos shilling complete)

surreal path
#

im good thanks

kind root
#

Nah it works lol

#

Or take pmos

surreal path
finite summit
#

no

#

it generates a GPE

surreal path
#

ohhhh

#

okay

finite summit
#

(you'd know that if you read obos' source as a reference)

surreal path
#

so i have to make a GPE handler for the embedded controller

finite summit
surreal path
#

okay

#

whats the exact different betqween brust and normal mode

#

in this context

#

nvm found the section in the acpi spec

#

nvm

#

what sa opsm

#

ospm

#

i have a spasm

#

get it

finite summit
#

OSPM is you

#

the kerenl

surreal path
#

ohhh

finite summit
#

*kernel

surreal path
# surreal path wait

do i need to constantly turn on burst enable, issue comamnds and then disable when talking to the EC?

finite summit
#

no

#

read obos, pmos, or managarm source

surreal path
#

i am reading it

#

im still confusing

#

confused

finite summit
#

you are confusing

surreal path
#

bru

#

in what situations do u use brust enable tho

#

burst*

#

???

#

cause i see u use it everywhere in obos

#

source

finite summit
#

there are three mentions of it in my ec driver

surreal path
#

yea but

#

i want to understand why

finite summit
#

because managarm did so lul

surreal path
#

lmao

#

sorry what is uacpi_region_rw_data

kind root
#

If u dont do burst u must do one byte per ec irq

#

For async commands

finite summit
#

it

#

s

kind root
#

Thats just more code

thorny glen
#

what is IRQL_GPE

kind root
surreal path
finite summit
finite summit
#

*at

surreal path
#

is that it?

finite summit
#

and the offset

thorny glen
finite summit
#

mixing up acronyms

surreal path
#

is this for if uacpi wants to read or write something to the EC?

#

or is this just a easier way to

#

write to the EC

#

and read

finite summit
surreal path
finite summit
#

it's the thing that uacpi passes to you

thorny glen
#

oh so im guessing its like your dispatch level/ipldpc

finite summit
surreal path
#

ohhh makes sense

finite summit
surreal path
#

well it actually looks quite simple

finite summit
#

and I like that number

thorny glen
#

oh ok i dont have anything interesting to say about that

surreal path
#

all i need to do is,
find the ec
on gpe query ec if it wants to execute aml
thats it?

#

is that literarly it?

finite summit
#

one more thing

surreal path
#

what else

finite summit
#

you need to install handlers for ec read/write

surreal path
#

wdym

finite summit
#

check source

surreal path
#

sorry if this is a stupid question

finite summit
#

aml can make reads/writes to EC, but you're the one handling it

surreal path
#

okay

finite summit
#

it's what uacpi_region_rw_data does

surreal path
finite summit
#

yes

surreal path
#

okay quite simple

#

i will start by creating an ec source file and stealing some of ur macros in ur source

finite summit
surreal path
#

lol

surreal path
# surreal path okay

just keeping a list of what i need to do

find ec
if it exists install handlers for read and writes to it
on handler check if sci
give aml some functions to read and write to ec

and yeah

#

i also see there MIGHT be an acpi table for the ec

#

that COULD

#

exist

#

called the ECDT?

finite summit
#

yes

#

but if not, you look for the EC in the acpi namespace

surreal path
#

so if it does exist find the ec via there

surreal path
#

yea that makes sense

surreal path
#

super cool interrupt

#

i thought ec would be EXTREMELY difficult

finite summit
#

basically:

BEFORE NAMESPACE LOAD!!
if ECDT
  init_from_ecdt
AFTER NAMESPACE INIT!!!
if !ECDT
  init_from_namespace```
surreal path
#

but its actually easy?

finite summit
#

yes

finite summit
#

we were just scaring you so you don't brick your pc trl

surreal path
#

so why am i going to be the 4th hobby os to do it, why dont more hobby oses do it?

#

if its so easy

finite summit
#

because not enough people give a fuck

#

for good reason

surreal path
#

fair

#

who wants to see nyaux get ec in voice 0

plush hearth
#

since I'm bored, I'll watch

finite summit
surreal path
#

join

surreal path
finite summit
#

nor do any VMs, afaik

kind root
#

^

plush hearth
surreal path
#

whats the gpe bit?

#

or well

#

ec_gpe_idx

#

does that tell u which gpe is coming from the ec?

#

??

plush hearth
#

do you not like to sleep?

surreal path
#

no

surreal path
#

acpi spec does not mention it

#

or well

#

i cant find where it mentions it

finite summit
surreal path
finite summit
#

you get it from evaluating _GPE in the EC node

#

and taking it as an integer

#

uacpi_eval_integer

surreal path
#

okay makes sense

#

thanks

finite summit
#

np

surreal path
#

do i have permission to yoink this function

#

im yoinking it

finite summit
#

sure

#

just check the license

#

make sure

surreal path
#

whats ur licesne again

finite summit
#

MIT

surreal path
#

yea thats fine

finite summit
#

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

#

OK

#

DO YOU GET THAT??

surreal path
#

๐Ÿ˜ญ

#

yes

finite summit
#

/lh

kind root
#

What is nyaux going to do with lid events

surreal path
finite summit
#

have that as his stdin

kind root
#

True

finite summit
#

(since his keyboard driver triple faults)

kind root
#

Lmao

surreal path
finite summit
#

yet

surreal path
#

bru

finite summit
#

-# trl

kind root
#

Aml + ec events is still more reliable to get input than a ps2 driver

plush hearth
#

ps2 is really weird

finite summit
#

indeed

plush hearth
#

and seems to break in every way possible

finite summit
plush hearth
#

I discovered that the hard way in my original kernel

#

thanks to my annoying laptop

kind root
#

Yeah ps2 breaks all the fucking time

#

Thats why I wanna make a ups2

plush hearth
#

that would be very helpful

#

don't you already have a really good ps2 driver?

kind root
#

Yeah but its in c++ and is a mess

#

And not portable

plush hearth
#

ah

kind root
#

But generally it worked on everything I threw at it

finite summit
#

waiting for the day infy makes ultraos

#

ultraos will replace linux!1!11!1!!!

#

and windows!!1!!1!1

finite summit
#

@elder shoal my laptop has native ps/2

#

can you send me the latest astral iso, maybe I can test it

surreal path
#

what is a address space handler

plush hearth
elder shoal
surreal path
finite summit
#

actually nvm

#

I can't

surreal path
#

๐Ÿ˜ญ

finite summit
#

yes

surreal path
#

what is it

finite summit
#

@elder shoal nvm I have an astral iso

finite summit
surreal path
#

@finite summit what is the ign bit in the ec

finite summit
#

ignored

#

probably

surreal path
#

so why are u writing that value to the command register

#

in ec_read

finite summit
#

what

surreal path
#

RD_EC

#

0x80

finite summit
#

yeah

#

that's read EC

#

command

surreal path
finite summit
#

your point?

surreal path
#

am i looking at the wrong thing

finite summit
#

yes

surreal path
#

wheres data sheet for

finite summit
#

look at the command set

surreal path
#

thanks

finite summit
#

somewhere in that same chapter, idr where

surreal path
#

okay that makes sense

#

thanks

finite summit
#

np

surreal path
#

got these beautiful functions now

#

time to

#

make the thingys for uacpi

#

lol

#

that is done

#

okayyy

#

@finite summit what ze hell are u doing here

#

my brain is fried reading this

finite summit
#

skill issue

surreal path
#

๐Ÿ˜ก

#

nah but seriously tho

finite summit
#
snprintf(method, 5, "_Q%02X", idx);```
#

then I evaluate method

surreal path
#

what

finite summit
#

what what

surreal path
#

???

#

i dont understand

#

wdym evulate method

#

why are u evulating a uacpi method

#

why

finite summit
#

you evaluate the method

#

because that's how it works

surreal path
#

and it puts it in _Q?

#

in its node?

finite summit
#

no

#

what?

surreal path
finite summit
#

you have idx

#

that gets turned to hex

#

appended to _Q

tawdry mirage
#

the method name is _Qxx where xx is the number of the query

finite summit
#

thanks qookie for explaining that

#

my brain is fried from debugging

surreal path
#

sorry

#

this just tells uacpi we finished handling the ec gpe right?

finite summit
#

yes

#

(managarm does it so I do it too)

surreal path
#

okay fair

#

obos does it too

#

so i do it too

#

anyways ec is nearly done

#

ima wait til 15 minutes so i can eat the other half of my pizza

#

then ill finish the ec

#

@plush hearth no longer streaming lol

plush hearth
#

alright

surreal path
#

nyaux after being automatically better then ever other hobby os project that doesnt have ec because it has efc

#

ec(

#

ec*

surreal path
#

NEARLY DONE

#

JUST NEED TO MAKE THE GPE HANDLER

#

WE HAVE EC

#

@flat nymph u awake

#

or anyone with an ec yall awake wanna test thisss

rigid fable
surreal path
rigid fable
surreal path
#

no

tawdry mirage
#

so much for testing ec

surreal path