From nobody Fri Feb 02 06:16:08 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 4TR5BY2YCqz59X6C for ; Fri, 2 Feb 2024 06:16:21 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 4TR5BY0tXmz4X00 for ; Fri, 2 Feb 2024 06:16:21 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40fb020de65so15084785e9.2 for ; Thu, 01 Feb 2024 22:16:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706854580; x=1707459380; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/rdH+OuwVHtgRtF73Vk2plzr56dKjhl+ZblpkvYWDRA=; b=H0u4Nv/+bbHp/gYvgz2POoFADWSOjMhSkMu1+7l1mCUB9lOADo0IhawOZFuIGI3dbm yTIXbKfAt/7+zUeIPQVeqHb7hE2+kSFBwQd+nyQKmdQob4bUtxxIsk7wuPCB0AyXZePZ WxFvj04fhz+6LghISy34LmsqMkV2YzFDdRqV/1FyjODbzO4D4eZH9UmUMx4APwfqjp0+ QrFvV7YTP3L5exW/E/4QuJQRIIgVGiOBVqne7RmLnPssfS4B7Ta40cBME5TQeW3YQIVO xw5UiL2wyOHfGA8GFas/Z7miNNhMXYAbxyqAeIxZHSVTZm8WHYgLibzNyFC9A85DG0WQ +S4w== X-Gm-Message-State: AOJu0YxorNAUcHS4EV7KSXvwyUpvZo/OGOvvx4j6zZ/pWTTZB0KEjoYW 6ZibOkzY7PZ/XWb6z/OQ2O2360n/VxZfkq6E+oeHiBjYXDLSup/QlipWRkXqsq0= X-Google-Smtp-Source: AGHT+IHx2moQzjQclTUT/ZRZq/LY1jj6NIU+uWpr26YlYLOVSNmNbEgPfhREw8cZcqHvceIm71s2Kw== X-Received: by 2002:a05:600c:450f:b0:40e:f736:8152 with SMTP id t15-20020a05600c450f00b0040ef7368152mr5257832wmo.14.1706854579704; Thu, 01 Feb 2024 22:16:19 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVeoyRxbur9rpd4zG3p339BBpCSG9JmhyCw6xA5ewbs+xsQZ29RaSZ546/oRUM/XGZEE5nez42zjE00QrCmnktoMFs= Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id o1-20020a5d6481000000b0033af26545c8sm1129164wri.50.2024.02.01.22.16.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2024 22:16:19 -0800 (PST) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: A little bit wondering about how a syscall works From: Jessica Clarke In-Reply-To: Date: Fri, 2 Feb 2024 06:16:08 +0000 Cc: freebsd-riscv , Mitchell Horne Content-Transfer-Encoding: 7bit Message-Id: <44422F40-D64C-493D-B3DA-600FE2F0D833@freebsd.org> References: <9204b5c5-63bc-4c29-af19-1f1bb85f74e8@Spark> <8f66f3ed-2a49-4ebc-89eb-66c53e6d22bb@Spark> <9bfbdbe2-ff30-4c2f-abf3-2763aa433107@freebsd.org> <8867a483-7e92-4579-9236-32b4a704713e@Spark> <51285fdf-dbcf-4d71-82cb-f49353db95cd@freebsd.org> <1D587966-19FD-47C9-B362-B55068665C2E@freebsd.org> To: Lin Lee X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TR5BY0tXmz4X00 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:209.85.128.0/17, country:US] On 2 Feb 2024, at 06:14, Lin Lee wrote: > > Opps, it's a typo. I meant sv_fetch_syscall_args. > > It executes `sv_fetch_syscall_args`, then it runs system calls. > > It is right, isn't? Yes, you need to fetch the arguments before you can use them. Jess > Best Regards, > Lin Lee > On Feb 1, 2024 at 12:47 AM +0800, wrote: >> >> sv_fetch_syscall_args