From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8522 invoked from network); 17 Mar 2022 09:08:01 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 17 Mar 2022 09:08:01 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 4ess; Wed Mar 16 11:23:50 -0400 2022 Received: from abbatoir.myfiosgateway.com (pool-74-108-56-225.nycmny.fios.verizon.net [74.108.56.225]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 47ff0367 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Wed, 16 Mar 2022 08:16:45 -0700 (PDT) Message-ID: <8AC8824D6BC53647BD53EA247C485993@eigenstate.org> To: 9front@9front.org Date: Wed, 16 Mar 2022 11:16:44 -0400 From: ori@eigenstate.org In-Reply-To: <983983D5-BCC6-4187-9F01-70C81C81ABE0@firstpost.pub> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: generic ACPI cache pipelining hosting-based high-performance control Subject: Re: [9front] Go: "exec header invalid" Reply-To: 9front@9front.org Precedence: bulk Quoth sml : > > Am 15.03.2022 um 12:15 schrieb Philip Silva : > > > > 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.