创建
This commit is contained in:
commit
da43152a7e
3380 files changed
+1128754
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#include <rtthread.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <elf.h>
|
||||
#ifdef ARCH_MM_MMU
|
||||
#include <mmu.h>
|
||||
#include <page.h>
|
||||
#endif
|
||||
|
||||
#define Elf_Word Elf64_Word
|
||||
#define Elf_Addr Elf64_Addr
|
||||
#define Elf_Half Elf64_Half
|
||||
#define Elf_Ehdr Elf64_Ehdr #define Elf_Phdr Elf64_Phdr
|
||||
#define Elf_Shdr Elf64_Shdr
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Elf_Word st_name;
|
||||
Elf_Addr st_value;
|
||||
Elf_Word st_size;
|
||||
unsigned char st_info;
|
||||
unsigned char st_other;
|
||||
Elf_Half st_shndx;
|
||||
} Elf_sym;
|
||||
|
||||
void arch_elf_reloc(void *text_start, void *rel_dyn_start, size_t rel_dyn_size, void *got_start, size_t got_size, Elf_sym *dynsym)
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2024 RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2024-07-04 rcitach init ver.
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <gtimer.h>
|
||||
#include <ktime.h>
|
||||
#include <time.h>
|
||||
#include <vdso_datapage.h>
|
||||
#include <vdso_data.h>
|
||||
|
||||
void rt_vdso_update_glob_time(void)
|
||||
{
|
||||
struct vdso_data *vdata = get_k_vdso_data();
|
||||
struct timespec *vdso_ts;
|
||||
uint64_t initdata = vdata->realtime_initdata;
|
||||
rt_vdso_write_begin(vdata);
|
||||
|
||||
vdso_ts = &vdata[CS_HRES_COARSE].basetime[CLOCK_REALTIME];
|
||||
rt_ktime_boottime_get_ns(vdso_ts);
|
||||
vdso_ts->tv_sec = initdata + vdso_ts->tv_sec;
|
||||
|
||||
vdso_ts = &vdata[CS_HRES_COARSE].basetime[CLOCK_MONOTONIC];
|
||||
rt_ktime_boottime_get_ns(vdso_ts);
|
||||
|
||||
vdata->cycle_last = rt_hw_get_cntpct_val();
|
||||
rt_vdso_write_end(vdata);
|
||||
}
|
||||
Reference in new issue
Block a user