Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
kaashoek committed Aug 30, 2018
1 parent f304887 commit e559fd2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,17 @@ lapicstartap(uchar apicid, uint addr)
#define MONTH 0x08
#define YEAR 0x09

static uint cmos_read(uint reg)
static uint
cmos_read(uint reg)
{
outb(CMOS_PORT, reg);
microdelay(200);

return inb(CMOS_RETURN);
}

static void fill_rtcdate(struct rtcdate *r)
static void
fill_rtcdate(struct rtcdate *r)
{
r->second = cmos_read(SECS);
r->minute = cmos_read(MINS);
Expand All @@ -190,7 +192,8 @@ static void fill_rtcdate(struct rtcdate *r)
}

// qemu seems to use 24-hour GWT and the values are BCD encoded
void cmostime(struct rtcdate *r)
void
cmostime(struct rtcdate *r)
{
struct rtcdate t1, t2;
int sb, bcd;
Expand Down

0 comments on commit e559fd2

Please sign in to comment.