In the Linux kernel, does mmu_notifier_invalidate_*() work on ARM?
I know it works on X86(Intel) for invalidating mappings in EPT.
However, on ARM, I doubt it works.
I'm looking for a similar function on ARM.
Related
I am going through the CXL support in Linux Kernel and I found that there is no function or support for cxl.cache. I'm confused if the cache part is not yet implemented in linux kernel or if the kernel should not have access to the cache commands?
(I have seen up to the latest Kernel release, 5.19)
We have built a simple instruction set simulator for the sparc v8 processor. The model consists of a v8 processor, a main memory and a character input and a character output device. Currently I am able to run simple user-level programs on this simulator which are built using a cross compiler and placed in the modeled main memory directly.
I am trying to get a linux kernel to run on this simulator by building a simplest bootloader. (I'm considering uClinux which is made for mmu-less systems). The uncompressed kernel and the filesystem are both assumed to be present in the main memory itself, and all that my bootloader has to do is pass the relevant information to the kernel and make a jump to the start of the kernel code. I have no experience in OS development or porting linux.
I have the following questions :
What is this bare minimum information that a bootloader has to supply to the kernel ?
How to pass this information?
How to point the kernel to use my custom input/output devices?
There is some documentation available for porting linux to ARM boards, and from this documentation, it seems that the bootloader passes information about the size of RAM etc
via a data structure called ATAGS. How is it done in the case of a Sparc processor? I could not find much documentation for Sparc on the internet. There exists a linux bootloader for the Leon3 implementation of Sparc v8, but I could not find the specific information I was looking for in its code.
I will be grateful for any links that explain the bare minimum information to be passed to a kernel and how to pass it.
Thanks,
-neha
I would like to know is there any caveats in using sched_clock()? Any case when it is not safe to use? And is it okay if I use it very early in kernel.bootup?
Btw the Linux runs on ARM platform
I wonder, are there any ways to generate with the gcc some native x86 code (which can be booted without any OS)?
Yes, the Linux kernel is compiled with GCC and runs in ring 0 on x86.
The question isn't well-formed. Certainly not all of the instructions needed to initialize a modern CPU from scratch can be emitted by gcc alone, you'll need to use some assembly for that. But that's sort of academic because modern CPUs don't actually document all this stuff and instead expect your hardware manufacturer to ship firmware to do it. After firmware initialization, a modern PC leaves you either in an old-style 16 bit 8086 environment ("legacy" BIOS) or a fairly clean 32 or 64 bit (depending on your specific hardware platform) environment called "EFI Boot Services".
Operations in EFI mode are all done using C function pointers, and you can indeed build for this environment using gcc. See the gummiboot boot loader for an excellent example of working with EFI.
Lets say I've an Linux system running on a ARM processor. What are the current available tools for doing dynamic binary analyze/instrumentation? I was wondering if there is something like Pin but for ARM binaries.
Valgrind supports ARM. There also was PIN for ARM but it's been discontinued. You might be able to find an old copy, but it's likely won't support anything above ARMv5.