From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] Go: "exec header invalid"
Date: Wed, 16 Mar 2022 11:16:44 -0400 [thread overview]
Message-ID: <8AC8824D6BC53647BD53EA247C485993@eigenstate.org> (raw)
In-Reply-To: <983983D5-BCC6-4187-9F01-70C81C81ABE0@firstpost.pub>
Quoth sml <sml@firstpost.pub>:
> > Am 15.03.2022 um 12:15 schrieb Philip Silva <philip.silva@protonmail.com>:
> >
> > Actually there's also a 500$ bounty for this
> >
> > http://fqa.9front.org/appendixb.html
>
> I would like to add 50$ for this.
>
>
> At the moment, I’m trying to understand how plan9/arm is implemented, to get an idea what needs to be done for plan9/arm64.
>
> As far as I understand, /src/syscall/mksysnum_plan9.sh in go is used to get the information from /src/libc/9syscall/sys.h from plan9, using it in /src/syscall/zsysnum_plan9.go and at the beginning of /src/runtime/sys_plan9_arm.s.
>
> /src/runtime/defs_plan9_arm.go is the information from /arm/include/ureg.h with getter and setter functions.
There's no direct translation for most of them.
>
> But there are files like:
> src/runtime/os_plan9_arm.go
This just looks like it papers over the
fact that arm32 has no cycle counter;
not sure if arm64 has it -- if it does,
we should use it, if not, we should keep
this hack.
> src/runtime/rt0_plan9_arm.s
This code jumps into the runtime, after
setting up the arguments in a way that
rt0_go expects. Roughly the equivalent
of /sys/src/libcarm64/main9.s, though
the work is split differently, and go
does a lot more.
> / src/runtime/sys_plan9_arm.s (the part below the sysnums)
this is the glue that the go runtime uses to
talk to the OS; a thin abstraction layer over
the system calls.
> /src/syscall/asm_plan9_arm.s
A generic wrapper to do syscalls. Plan 9
has a wrapper per syscall, generated in
/sys/src/libc/9syscall/mkfile, go has
a generic 'Syscall(num, args...)' func.
> /src/syscall/syscall_plan9.go
The actual syscall package -- it's not arm
specific, so you shouldn't need to touch it.
> /src/syscall/zsyscall_plan9_arm.go
Looks like generated code, don't see why it'd
need to be adjusted, since our types are the
same across all archs.
> for which I cannot find the source in the plan9 code.
>
> Is there documentation about the go code itself, regarding the machine dependent parts?
Read the code, read the comments, ask quesstions. Not aware of
any good docs.
next prev parent reply other threads:[~2022-03-17 9:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-13 19:40 sml
2022-03-13 21:10 ` cinap_lenrek
2022-03-14 6:37 ` sml
2022-03-14 10:47 ` sml
2022-03-14 15:18 ` ori
2022-03-15 6:19 ` sml
2022-03-15 11:15 ` Philip Silva
2022-03-15 16:32 ` Kurt H Maier
2022-03-16 7:43 ` sml
2022-03-16 15:16 ` ori [this message]
2022-03-16 17:01 ` cinap_lenrek
2022-03-16 19:29 ` Steve Simon
2022-03-13 23:59 ` ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8AC8824D6BC53647BD53EA247C485993@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).