Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
abinade2
kernel
Commits
d4dbe141
Commit
d4dbe141
authored
7 years ago
by
Divyam Khandelwal
Browse files
Options
Downloads
Patches
Plain Diff
RTC Update
parent
9007f21b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
student-distrib/rtc.c
+6
-11
6 additions, 11 deletions
student-distrib/rtc.c
student-distrib/rtc.h
+1
-1
1 addition, 1 deletion
student-distrib/rtc.h
student-distrib/syscall.h
+1
-1
1 addition, 1 deletion
student-distrib/syscall.h
with
8 additions
and
13 deletions
student-distrib/rtc.c
+
6
−
11
View file @
d4dbe141
#include
"rtc.h"
/* Set interrupt flag */
interrupt_flag
=
1
;
//
interrupt_flag = 1;
/* For virtualisation */
rtc_active
[
MAX_TERMINAL
]
=
{
0
,
0
,
0
};
rtc_flag
[
MAX_TERMINAL
]
=
{
1
,
1
,
1
};
rtc_counter
[
MAX_TERMINAL
]
=
{
0
,
0
,
0
};
rtc_init_counter
[
MAX_TERMINAL
]
=
{
0
,
0
,
0
};
int
rtc_active
[
MAX_TERMINAL
]
=
{
0
,
0
,
0
};
int
rtc_flag
[
MAX_TERMINAL
]
=
{
1
,
1
,
1
};
int
rtc_counter
[
MAX_TERMINAL
]
=
{
0
,
0
,
0
};
int
rtc_init_counter
[
MAX_TERMINAL
]
=
{
0
,
0
,
0
};
/* rtc_init()
* Inputs: void
...
...
@@ -104,12 +104,7 @@ int32_t rtc_read(int32_t fd, void* buf, int32_t nbytes)
*/
int32_t
rtc_write
(
int32_t
fd
,
const
void
*
buf
,
int32_t
nbytes
)
{
int32_t
freq
,
temp_freq
;
int
valid_freq
;
int
i
;
uint8_t
rate
,
prev
;
uint8_t
bit_mask
=
0x01
;
int32_t
freq
,
valid_freq
;
/* Check for null pointer */
if
(
buf
==
NULL
)
...
...
This diff is collapsed.
Click to expand it.
student-distrib/rtc.h
+
1
−
1
View file @
d4dbe141
...
...
@@ -29,7 +29,7 @@
#define REGISTER_C 0x0C
/* Interrupt flag for read() */
extern
int
interrupt_flag
;
//
extern int interrupt_flag;
/* Global Variables for Virtualization */
extern
int
rtc_active
[
MAX_TERMINAL
];
...
...
This diff is collapsed.
Click to expand it.
student-distrib/syscall.h
+
1
−
1
View file @
d4dbe141
...
...
@@ -37,7 +37,7 @@ extern int32_t sigreturn (void);
//from paging.h
void
flush_tlb
(
void
);
void
remap_program
(
uint32_t
pid
);
//uint8_t*
remap_vidmem(
uint32_t pid
);
extern
void
remap_vidmem
();
//from proc.h
int32_t
parse_cmd
(
const
uint8_t
*
command
,
uint8_t
*
cmd
,
uint8_t
(
*
argv
)[
MAX_ARGUMENT_SIZE
]);
/* Function for parsing commands */
...
...
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