Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Feb 2020 13:35:56 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r357677 - head/sys/arm64/linux
Message-ID:  <202002081335.018DZuN9072334@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sat Feb  8 13:35:56 2020
New Revision: 357677
URL: https://svnweb.freebsd.org/changeset/base/357677

Log:
  Implement the Linux/arm64 VDSO gettimeofday and clock_gettime
  
  These are used by Centos 7 and will be needed for the
  emulators/linux_base-c7 port.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/arm64/linux/linux_locore.asm

Modified: head/sys/arm64/linux/linux_locore.asm
==============================================================================
--- head/sys/arm64/linux/linux_locore.asm	Sat Feb  8 13:33:47 2020	(r357676)
+++ head/sys/arm64/linux/linux_locore.asm	Sat Feb  8 13:35:56 2020	(r357677)
@@ -2,6 +2,7 @@
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  *
  * Copyright (C) 2018 Turing Robotic Industries Inc.
+ * Copyright (C) 2020 Andrew Turner <andrew@FreeBSD.org>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -33,6 +34,8 @@
 
 #include <machine/asm.h>
 
+#include <arm64/linux/linux_syscall.h>
+
 	.data
 
 	.globl linux_platform
@@ -46,11 +49,13 @@ ENTRY(__kernel_rt_sigreturn)
 	ret
 
 ENTRY(__kernel_gettimeofday)
-	brk #0 /* LINUXTODO: implement __kernel_gettimeofday */
+	ldr	x8, =LINUX_SYS_gettimeofday
+	svc	#0
 	ret
 
 ENTRY(__kernel_clock_gettime)
-	brk #0 /* LINUXTODO: implement __kernel_clock_gettime */
+	ldr	x8, =LINUX_SYS_linux_clock_gettime
+	svc	#0
 	ret
 
 ENTRY(__kernel_clock_getres)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002081335.018DZuN9072334>