Skip to content

Commit a10fb49

Browse files
author
hrsu
committed
ChCore Lab 2
1 parent aa149a5 commit a10fb49

File tree

233 files changed

+15397
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+15397
-61
lines changed

.clang-format

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
#
2+
# clang-format configuration file.
3+
#
4+
# For more information, see:
5+
#
6+
# Documentation/process/clang-format.rst
7+
# https://clang.llvm.org/docs/ClangFormat.html
8+
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
9+
#
10+
---
11+
AccessModifierOffset: -4
12+
AlignAfterOpenBracket: Align
13+
AlignConsecutiveAssignments: false
14+
AlignConsecutiveDeclarations: false
15+
AlignConsecutiveMacros: true
16+
AlignEscapedNewlines: Left
17+
AlignOperands: true
18+
AlignTrailingComments: false
19+
AllowAllParametersOfDeclarationOnNextLine: false
20+
AllowShortBlocksOnASingleLine: false
21+
AllowShortCaseLabelsOnASingleLine: false
22+
AllowShortFunctionsOnASingleLine: None
23+
AllowShortIfStatementsOnASingleLine: false
24+
AllowShortLoopsOnASingleLine: false
25+
AlwaysBreakAfterDefinitionReturnType: None
26+
AlwaysBreakAfterReturnType: None
27+
AlwaysBreakBeforeMultilineStrings: false
28+
AlwaysBreakTemplateDeclarations: false
29+
BinPackArguments: false
30+
BinPackParameters: true
31+
BraceWrapping:
32+
AfterClass: false
33+
AfterControlStatement: false
34+
AfterEnum: false
35+
AfterFunction: true
36+
AfterNamespace: true
37+
AfterObjCDeclaration: false
38+
AfterStruct: false
39+
AfterUnion: false
40+
AfterExternBlock: false
41+
BeforeCatch: false
42+
BeforeElse: false
43+
IndentBraces: false
44+
SplitEmptyFunction: true
45+
SplitEmptyRecord: true
46+
SplitEmptyNamespace: true
47+
BreakBeforeBinaryOperators: NonAssignment
48+
BreakBeforeBraces: Custom
49+
BreakBeforeInheritanceComma: false
50+
BreakBeforeTernaryOperators: false
51+
BreakConstructorInitializersBeforeComma: false
52+
BreakConstructorInitializers: BeforeComma
53+
BreakAfterJavaFieldAnnotations: false
54+
BreakStringLiterals: false
55+
ColumnLimit: 80
56+
CommentPragmas: '^ IWYU pragma:'
57+
CompactNamespaces: false
58+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
59+
ConstructorInitializerIndentWidth: 8
60+
ContinuationIndentWidth: 8
61+
Cpp11BracedListStyle: true
62+
DerivePointerAlignment: true
63+
DisableFormat: false
64+
ExperimentalAutoDetectBinPacking: false
65+
FixNamespaceComments: false
66+
67+
# Taken from:
68+
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' kernel/include/ user/musl-*/include/ \
69+
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
70+
# | sort | uniq
71+
ForEachMacros: # Updated by RC
72+
- 'for_each_efi_memory_desc'
73+
- 'for_each_efi_memory_desc_in_map'
74+
- '__for_each_in_hlist'
75+
- 'for_each_in_hlist'
76+
- '__for_each_in_hlist_safe'
77+
- 'for_each_in_hlist_safe'
78+
- 'for_each_in_htable'
79+
- 'for_each_in_htable_safe'
80+
- 'for_each_in_list'
81+
- 'for_each_in_list_reverse'
82+
- '__for_each_in_list_safe'
83+
- 'for_each_in_list_safe'
84+
- 'for_each_node_in_list'
85+
- 'for_each_set_bit'
86+
- 'wl_array_for_each'
87+
- 'wl_list_for_each'
88+
- 'wl_list_for_each_reverse'
89+
- 'wl_list_for_each'
90+
91+
IncludeBlocks: Preserve
92+
IncludeCategories:
93+
- Regex: '.*'
94+
Priority: 1
95+
IncludeIsMainRegex: '(Test)?$'
96+
IndentCaseLabels: false
97+
IndentPPDirectives: None
98+
IndentWidth: 8
99+
IndentWrappedFunctionNames: false
100+
JavaScriptQuotes: Leave
101+
JavaScriptWrapImports: true
102+
KeepEmptyLinesAtTheStartOfBlocks: false
103+
MacroBlockBegin: ''
104+
MacroBlockEnd: ''
105+
MaxEmptyLinesToKeep: 1
106+
NamespaceIndentation: None
107+
108+
# Taken from git's rules
109+
PenaltyBreakAssignment: 10
110+
PenaltyBreakBeforeFirstCallParameter: 30
111+
PenaltyBreakComment: 10
112+
PenaltyBreakFirstLessLess: 0
113+
PenaltyBreakString: 10
114+
PenaltyExcessCharacter: 100
115+
PenaltyReturnTypeOnItsOwnLine: 60
116+
117+
PointerAlignment: Right
118+
ReflowComments: true
119+
SortIncludes: false
120+
SortUsingDeclarations: false
121+
SpaceAfterCStyleCast: false
122+
SpaceAfterTemplateKeyword: true
123+
SpaceBeforeAssignmentOperators: true
124+
SpaceBeforeCtorInitializerColon: true
125+
SpaceBeforeInheritanceColon: true
126+
SpaceBeforeParens: ControlStatements
127+
SpaceBeforeRangeBasedForLoopColon: true
128+
SpaceInEmptyParentheses: false
129+
SpacesBeforeTrailingComments: 1
130+
SpacesInAngles: false
131+
SpacesInContainerLiterals: false
132+
SpacesInCStyleCastParentheses: false
133+
SpacesInParentheses: false
134+
SpacesInSquareBrackets: false
135+
Standard: Cpp03
136+
TabWidth: 8
137+
UseTab: Never
138+
...

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Checks: '-*,bugprone-*,clang-analyzer-*,concurrency-*,linuxkernel-*,performance-*,portability-*'
2+
FormatStyle: file

.gdbinit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set architecture aarch64
2+
target remote localhost:1234
3+
set substitute-path /chos/ ./
4+
layout split
5+
6+
file ./build/kernel.img

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
*.o
2+
*.elf
3+
*.img
4+
*.bin
5+
tags
6+
cscope.*
7+
*.swp
8+
9+
!/**/firmware/*.bin
10+
!/**/firmware/*.elf
11+
12+
build
13+
.vscode
14+
simulate.sh
15+
debug.sh
16+
.config
17+
.*-config
18+
19+
chcore-libc/build
20+
chcore-libc/obj
21+
chcore-libc/lib
22+
23+
asm
24+
25+
kernel/include/arch/aarch64/arch/virt/asm-offsets.h
26+
27+
user/vmm/vm_img
28+
user/vmm/vm_config
29+
user/vmm/vm_result
30+
31+
run_*
32+
33+
exec_log
34+
make-tag.sh
35+
36+
!scripts/build/
37+
38+
/ramdisk
39+
/.chpm
40+
/.cpp
41+
__pycache__
42+
43+
infer_*_report.txt
44+
infer-out/
45+
.repo/

0 commit comments

Comments
 (0)