diff options
Diffstat (limited to 'src/pc80/mc146818rtc_early.c')
-rw-r--r-- | src/pc80/mc146818rtc_early.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pc80/mc146818rtc_early.c b/src/pc80/mc146818rtc_early.c index 35f3f5910f..0c7d822718 100644 --- a/src/pc80/mc146818rtc_early.c +++ b/src/pc80/mc146818rtc_early.c @@ -97,3 +97,14 @@ static int do_normal_boot(void) return (byte & (1<<1)); } + +static unsigned read_option(unsigned start, unsigned size, unsigned def) +{ +#if USE_OPTION_TABLE == 1 + unsigned byte; + byte = cmos_read(start/8); + return (byte >> (start & 7U)) & ((1U << size) - 1U); +#else + return def; +#endif +} |