Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.development > #8383
| From | "Rod Pemberton" <boo@fasdfrewar.cdm> |
|---|---|
| Newsgroups | alt.os.development |
| Subject | Re: OS startup goals and steps |
| Date | 2015-07-15 04:00 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <op.x1s1vregyfako5@localhost> (permalink) |
| References | <mo2l1n$7o2$1@dont-email.me> |
On Tue, 14 Jul 2015 05:35:10 -0400, James Harris <james.harris.1@gmail.com> wrote: > You guys may be interested in this and/or have some suggestions or > thoughts on it. I have worked up a set of goals and steps to get an OS > running, considering having the OS run on x86 (3 modes) and ARM so there > are to be four versions of the OS with a common startup approach. There > are only three primary goals: ... > Goal 1. Start logging so that info can be captured Well, Ben and you are logging to files. My OS only went as far as displaying output to the screen. You can pack quite a bit of info onto the screen as long as you don't need the screen for user display, i.e., during development. > Goal 2. Start multitasking so that other init can be concurrent So, just jump right into it? ... > Goal 3. Interact with the user (i.e. the OS is ready for use) So, is this minimal, i.e., just keyboard and console, maybe mouse, or everything available? > The goals are intended to be achieved in order and they guide the set of > steps that the OS startup needs to follow. The steps are currently as > follows with the numbered goals shown at the points where they will have > been achieved. > > - Set up initial register values > - Set up temporary memory management, if required > - Identify a small buffer to log to, say 8k > - Capture whatever is already on the screen > - Identify a basic upcounter and a time-of-day clock, if any > - Set up somewhere to write debugging output, e.g. VGA > - Set up logging and a console > 1. Achieved goal to start logging Why "temporary" memory management? You've loaded the OS into memory. Or, is this part of the bootloader? I see these as being part of the OS proper. Why do you need to save what is already on the screen? ... You have BIOS calls below. Any BIOS calls here for VGA or VESA modes? > - Carry out interactions that may not be possible in final OS mode > - PC architecture > - Get the century and the rest of the date and time > - Hide the text-mode cursor (int 0x10_12 bl=0x34 or int 0x10_01) > - Find out what memory we have available > - e820 or similar modified by 0x15_c1 etc > - Set ES=0 on entry or some BIOSes will set carry > - Get info about machine, possibly including MCA (int 0x15_c0) > - Ensure A20 is enabled (asm) > - Enter OS mode, as required > - Real mode: > - Save original interrupt vectors, for info > - Pmode: > - Enable Pmode (asm) > - Set up paging > - Long mode: > - Enable long mode (asm) > - Set up paging > - ARM: > - Save original interrupt vectors, for info > - Set up paging (possibly) > - Set up memory management (mode-specific C) > - Set up new logging and copy from prior buffer (C) > - Interrupt controller and interrupt receipt (architecture-specific C) > - A ticker (C) > - Real-time clock > - A scheduler and multitasking (C) > - Jump to idle task stub > 2. Achieved goal to start multitasking With one exception, I expect the bootloader to do the steps from "PC arch..." through to and including "Enter OS mode...". I expect the OS to do memory management and thereafter to 2. Also, I'd expect the OS to access the RTC for date and time, not what I view as the "bootloader." I'm not sure what info you'd really need from Int 15h, AH=C0h. AIR, it was mostly for obsoleted machines. Hide the text mode cursor? ... Clear screen? > - Launch tasks for concurrent hardware discovery (C) > - Once enough of the machine is ready start the shell (C) > 3. Achieved goal to start interacting with user OS stuff. So, ISTM, you have OS stuff to 1, bootloader stuff to non-temporary C memory management, OS stuff to 2, and more OS stuff to 3, except for the RTC in the "bootloader" section. Rod Pemberton
Back to alt.os.development | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OS startup goals and steps "James Harris" <james.harris.1@gmail.com> - 2015-07-14 10:35 +0100
Re: OS startup goals and steps "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 04:00 -0400
Re: OS startup goals and steps "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-15 22:29 -0400
Re: OS startup goals and steps "James Harris" <james.harris.1@gmail.com> - 2015-07-16 08:00 +0100
Re: OS startup goals and steps "James Harris" <james.harris.1@gmail.com> - 2015-07-16 11:01 +0100
Re: OS startup goals and steps "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-17 05:40 -0400
Re: OS startup goals and steps "wolfgang kern" <nowhere@never.at> - 2015-07-17 17:58 +0200
Re: OS startup goals and steps "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-07-16 03:24 -0700
Re: OS startup goals and steps "James Harris" <james.harris.1@gmail.com> - 2015-07-16 10:32 +0100
Re: OS startup goals and steps "wolfgang kern" <nowhere@never.at> - 2015-07-16 16:04 +0200
Re: OS startup goals and steps "James Harris" <james.harris.1@gmail.com> - 2015-07-17 06:44 +0100
Re: OS startup goals and steps "wolfgang kern" <nowhere@never.at> - 2015-07-17 17:50 +0200
Re: OS startup goals and steps "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-17 06:10 -0400
Re: OS startup goals and steps "James Harris" <james.harris.1@gmail.com> - 2015-07-17 18:07 +0100
Re: OS startup goals and steps "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-18 03:35 -0400
Re: OS startup goals and steps "wolfgang kern" <nowhere@never.at> - 2015-07-16 14:42 +0200
Re: OS startup goals and steps "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-17 05:48 -0400
Re: OS startup goals and steps "wolfgang kern" <nowhere@never.at> - 2015-07-17 17:29 +0200
csiph-web