From nobody Wed Jan 31 05:03:04 2024 X-Original-To: freebsd-riscv@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPqg83hNwz58QqF for ; Wed, 31 Jan 2024 05:03:16 +0000 (UTC) (envelope-from leelin2602@gmail.com) Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPqg81HVLz4ZsG; Wed, 31 Jan 2024 05:03:16 +0000 (UTC) (envelope-from leelin2602@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3be61772d9aso1230819b6e.3; Tue, 30 Jan 2024 21:03:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706677394; x=1707282194; darn=freebsd.org; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=nbLCORbVTsdDntB+Roxw9FkB7vciVRfVsqZzgIdxY18=; b=WSo6fXdErlOoA4iL6RP1p6e/gj9agcAb/GpPZnzMCleZfyurgSjaA4nCqrHmEkm0x9 //4OqwZhXnC86fpfWcokyPPZ6xlZLmW8xmeK0MJ9Gkf8g4AQUW6VRc1VUO8rGOh6GsAS l3zC5vh/sYAAAxNrFcJQUprPbv9NvoDhwJbFHEK/HpnL70y89pjso2agXtAsL6fbdy2X BWuRh1I4QVC3Kq5nQatSOC2kC8UsiJtR9U3x3fDZX9+uxGM/lKHD0i9LpUaXKUUAIoqB GSUsX7EKOf36O8a+tPVPDGXtVaxwLlIwhmBGP0TiyRQORkz45ohut9bh7T3jB1iF+2jV 9OLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706677394; x=1707282194; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nbLCORbVTsdDntB+Roxw9FkB7vciVRfVsqZzgIdxY18=; b=iCh6kSY1Xl34aYKLp8A4yGSgND8whhAd3pUh8BWoASmtkwdAoo6qymoZj8q/QgnVjE d0NQjB7X3XjSEZm6WA0P1/H738KQo4nwVbAtqrJe2Zrb2HKDckq7/RH2mS5iz7OPjU33 nNs0wSRrocran50dw9HnHA5IjTtzHpgINFJcSYwMvtElQueomjhjR+oCZLe7G8Dkhhxz tjjBhsXHyrMvAVJNI7Fe1ttIa7B97W+d9aTbZRMVBCgiDQWhNcq4yJdKf25PrQnVJ9ZP 587dGLS5gtg5eVk0Oz4EO3bYXGhyu6JhMHYV8dKqv1W57MGhMpZsscqC3esBthVD8e12 6Iug== X-Gm-Message-State: AOJu0YzrKQgKuB+nk89cQQ3ut3TBLWCoct0EZZAq+0Kf+dgyX3CyEDXd zAQculE40S1sMygxrLThi9hkGwgAtuM6vhoMhc1Ecfut4hpIxhhq/6uxPhwj X-Google-Smtp-Source: AGHT+IFU/J2B286dyL2n/qLiFKOsawnaZqCcC4Gsrkp890kYOlCNnxsypmT9UeBC/Kb/xZ+ahnVz2g== X-Received: by 2002:a05:6358:5bcc:b0:176:c94a:ec03 with SMTP id i12-20020a0563585bcc00b00176c94aec03mr439088rwf.17.1706677393879; Tue, 30 Jan 2024 21:03:13 -0800 (PST) Received: from [172.20.10.2] (114-137-55-104.emome-ip.hinet.net. [114.137.55.104]) by smtp.gmail.com with ESMTPSA id t12-20020a63460c000000b005d24e5ae4e3sm9313224pga.2.2024.01.30.21.03.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2024 21:03:13 -0800 (PST) Date: Wed, 31 Jan 2024 13:03:04 +0800 From: Lin Lee To: freebsd-riscv@freebsd.org, Mitchell Horne Message-ID: In-Reply-To: <9bfbdbe2-ff30-4c2f-abf3-2763aa433107@freebsd.org> References: <9204b5c5-63bc-4c29-af19-1f1bb85f74e8@Spark> <8f66f3ed-2a49-4ebc-89eb-66c53e6d22bb@Spark> <9bfbdbe2-ff30-4c2f-abf3-2763aa433107@freebsd.org> Subject: Re: A little bit wondering about how a syscall works X-Readdle-Message-ID: f2213278-0807-4a36-ab90-6d2a9555fc8c@Spark List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-riscv@freebsd.org X-BeenThere: freebsd-riscv@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="65b9d48d_3c9f4828_4d5" X-Rspamd-Queue-Id: 4TPqg81HVLz4ZsG X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --65b9d48d_3c9f4828_4d5 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Mitchell, Thank you for your kindly responding. Now I have still a question, when does the function cpu_fetch_syscall_args be called? As the previous letter mentions, I traced the code and entered the elf_machdep.c. I have no idea if there are something to do between elf_machdep.c and system calll. If not, when(how) the cpu_fetch_syscall_args is called? Thank you very much. Best Regards, Lin Lee On Jan 31, 2024 at 1:17 AM +0800, Mitchell Horne , wrote: > > Mitchell --65b9d48d_3c9f4828_4d5 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hello Mitchell,

Thank you for your kindly responding.

Now I have still a question, when does the function cpu=5Ffetch=5Fsyscall= =5Fargs be called=3F&=23160;

As the previous letter mentions, I traced the code and entered the elf=5F= machdep.c.

I have no idea if there are something to do between elf=5Fmachdep.c and s= ystem calll.

If not, when(how) the cpu=5Ffetch=5Fsyscall=5Fargs is called=3F

Thank you very much.

Best Regards,
Lin Lee
On Jan 31, 2024 at 1:17 AM +0800, M= itchell Horne <mhorne=40freebsd.org>, wrote:

Mitchell
--65b9d48d_3c9f4828_4d5--