This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# risudump - A wrapper script for dumping test blobs generated by | |
# risu (https://git.linaro.org/people/peter.maydell/risu.git) | |
# | |
# Copyright (C) 2018 Sandipan Das | |
# | |
if [ -z "$1" ] ; then | |
echo "Usage: $0 <file>" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct resv_map | |
--> for MAP_SHARED, resv_map is preallocated at some point and kept | |
in the inode mapping metadata | |
--> inode_resv_map() | |
--> resv_map = inode->i_mapping->private_data | |
--> for MAP_ANONYMOUS, vma->vm_private_data points to the map | |
sys_mmap() with MAP_PRIVATE, MAP_ANONYMOUS, MAP_HUGETLB in flags | |
--> ksys_mmap_pgoff() | |
--> hugetlb_file_setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _LARGEFILE64_SOURCE | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <errno.h> | |
#include <sys/mman.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Compile as follows: | |
* gcc -O0 -nostdlib -static gem5-endian-test.c | |
*/ | |
#ifndef __powerpc64__ | |
#error "unsupported architecture" | |
#endif | |
#define MSG "Hello world\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa | |
index 0dbe35a88..dd4a3a83c 100644 | |
--- a/src/arch/power/isa/decoder.isa | |
+++ b/src/arch/power/isa/decoder.isa | |
@@ -40,6 +40,14 @@ | |
// | |
decode PO default Unknown::unknown() { | |
+ format IntOp { | |
+ // Fake endianness switch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in (find $HOME/.config/fish/completions -name 'git-*.fish') | |
set gitcmd (basename $file .fish) | |
set subcmd (echo $gitcmd | sed 's/git-//g') | |
sed -i 's/'$gitcmd' /git -n \'__fish_git_using_command '$subcmd'\' /1' $file | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function | |
from bcc import BPF | |
from bcc.utils import printb | |
from time import sleep | |
# load BPF program | |
b = BPF(text=""" | |
#include <uapi/linux/ptrace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Hello World - PPC64LE Assembly | |
## This is the ELF ABI v2 little-endian equivalent of | |
## https://developer.ibm.com/articles/l-ppc/#listing-4-hello-world-ppc64-assembly | |
## | |
## Cross-compile as shown below. | |
## $ powerpc64le-linux-gnu-as hello.s -o hello.o | |
## $ powerpc64le-linux-gnu-ld hello.o -o hello | |
## | |
## Author: Sandipan Das <sandipan@linux.ibm.com> | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Building on Fedora 31 | |
sudo dnf -y install python2-scons python3-scons python2-devel python3-devel \ | |
protobuf-devel protobuf-compiler gperftools-devel | |
## Generate Gtags | |
find src/ -type f -print | gtags -i -f - | |
## Build for POWER | |
scons CPU_MODELS="AtomicSimpleCPU" build/POWER/gem5.debug -j4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Compile as: | |
* powerpc64-linux-gnu-gcc -o radix-stress -g -O0 \ | |
* -mcpu=powerpc64 -mno-altivec \ | |
* -mno-vsx -nostdlib -static \ | |
* radix-stress.c | |
*/ | |
#ifndef __powerpc64__ | |
#error "unsupported architecture" |
OlderNewer