Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
seL4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Panda
seL4
Commits
d53aa04f
Commit
d53aa04f
authored
9 years ago
by
Adrian Danis
Browse files
Options
Downloads
Patches
Plain Diff
x86: Abstractions for setting up benchmarking log
parent
1a85b409
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/arch/x86/arch/32/mode/object/structures.h
+17
-0
17 additions, 0 deletions
include/arch/x86/arch/32/mode/object/structures.h
src/arch/x86/kernel/boot.c
+3
-17
3 additions, 17 deletions
src/arch/x86/kernel/boot.c
with
20 additions
and
17 deletions
include/arch/x86/arch/32/mode/object/structures.h
+
17
−
0
View file @
d53aa04f
...
...
@@ -258,4 +258,21 @@ x86_make_empty_pte(void)
);
}
static
inline
pde_t
x86_make_pde_mapping
(
word_t
paddr
,
vm_attributes_t
attr
)
{
return
pde_pde_large_new
(
paddr
,
/* page_base_address */
vm_attributes_get_x86PATBit
(
attr
),
/* pat */
0
,
/* avl_cte_depth */
1
,
/* global */
0
,
/* dirty */
0
,
/* accessed */
vm_attributes_get_x86PCDBit
(
attr
),
/* cache_disabled */
vm_attributes_get_x86PWTBit
(
attr
),
/* write_through */
0
,
/* super_user */
1
,
/* read_write */
1
/* present */
);
}
#endif
This diff is collapsed.
Click to expand it.
src/arch/x86/kernel/boot.c
+
3
−
17
View file @
d53aa04f
...
...
@@ -163,7 +163,7 @@ init_sys_state(
create_frames_of_region_ret_t
create_frames_ret
;
#if CONFIG_MAX_NUM_TRACE_POINTS > 0
vm_attributes_t
buffer_attr
=
{{
0
}};
uint32
_t
paddr
;
word
_t
paddr
;
pde_t
pde
;
#endif
/* CONFIG_MAX_NUM_TRACE_POINTS > 0 */
...
...
@@ -195,24 +195,10 @@ init_sys_state(
/* allocate and create the log buffer */
buffer_attr
.
words
[
0
]
=
IA32_PAT_MT_WRITE_THROUGH
;
paddr
=
pptr_to_paddr
((
void
*
)
alloc_region
(
pageBitsForSize
(
IA32
_LargePage
)));
paddr
=
pptr_to_paddr
((
void
*
)
alloc_region
(
pageBitsForSize
(
X86
_LargePage
)));
/* allocate a large frame for logging */
pde
=
pde_pde_large_new
(
paddr
,
/* page_base_address */
vm_attributes_get_ia32PATBit
(
buffer_attr
),
/* pat */
0
,
/* avl_cte_depth */
1
,
/* global */
0
,
/* dirty */
0
,
/* accessed */
vm_attributes_get_ia32PCDBit
(
buffer_attr
),
/* cache_disabled */
vm_attributes_get_ia32PWTBit
(
buffer_attr
),
/* write_through */
0
,
/* super_user */
1
,
/* read_write */
1
/* present */
);
/* TODO this shouldn't be hardcoded */
pde
=
x86_make_pde_mapping
(
paddr
,
buffer_attr
);
ia32KSGlobalPD
[
IA32_KSLOG_IDX
]
=
pde
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment