Commit Graph

334 Commits

Author SHA1 Message Date
Axel Dörfler
3e2c0a3264 kDefaultPageFlags is now defined in mmu.h, so that it can be used
by other sources as well. Maybe we can remove that parameter from
mmu_map_physical_memory() altogether, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-10 14:45:24 +00:00
Axel Dörfler
a5ff23c727 Moved the vesa.h and vga.h headers to the private vesa driver header directory
for future use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-08 15:14:32 +00:00
Axel Dörfler
d3ff9cc39a The boot menu no longer changes the meaning of the default video mode once
you choose it in the menu.
The boot loader now always switches into a graphics mode unless it's in
debug mode (currently triggered by pressing the escape key on startup).
That means, "Standard VGA" now actually means mode 0x12 (640x480x4)
instead of text mode.
Since the current limited boot logo code would do stupid things with VGA
planes, there will now only be some colored blocks visible during boot.
Implemented support for monochrome modes in the frame buffer console.
Additionally, the frame buffer console now has support for the VGA mode; it
will treat all 4 bit modes as monochrome for now (the VGA 0x12 mode is a
planar mode so this works nicely).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-04 16:56:18 +00:00
Axel Dörfler
4d5f980d99 The boot loader MMU can now also unmap/free memory - this is needed if the frame
buffer resolution changes during execution (ie. if the boot menu is opened late
and you change the video mode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-04 16:10:09 +00:00
Axel Dörfler
e5b0e0b5e3 Changed the set_segment_descriptor()'s usage of the limit/granularity
flag. Now, it will choose how to set the granularity by evaluating the
limit.
This call was actually already used this way in the kernel, so that
the TLS and TSS segments were much too large (harmless but incorrect).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-04 14:34:18 +00:00
Axel Dörfler
c1e0d8cf5e The safe mode options now actually do what they should do, ie. the
selected "/safemode/" options are now passed to the kernel.
Added help texts to some safe mode options.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 20:10:19 +00:00
Axel Dörfler
29150acff7 console_set_cursor() now clips to screen size. This actually works around a
possible compiler bug that exposes with -O2 only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 20:06:31 +00:00
Axel Dörfler
2d7ad656ec Added "Disable IDE DMA" safemode option.
MenuItem::SetData() now asks for a const parameter.
The safemode menu options now set their MenuItem::Data() to the safemode option string.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 15:16:09 +00:00
Ingo Weinhold
a7c536d8ba * Now we set partition_data::content_type correctly. The intel
partitioning system module relies on it, otherwise extended
  partitions won't be recognized.
* Be a little less lazy and do the priority partition recognition,
  i.e. all partitioning systems are asked to identify a partition and
  the one that believes it can handle the partition best, wins the pot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 11:26:27 +00:00
Axel Dörfler
08a1527611 Added a "Safe mode" checkbox to the safe mode menu.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 11:04:36 +00:00
Axel Dörfler
9602a1c9d6 Also the page tables mapped my the boot loader must be accessible
to userland, as these tables might persist until the end.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-30 06:29:27 +00:00
Axel Dörfler
a45de3956f misc.c is no longer used.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-15 05:07:53 +00:00
Axel Dörfler
eec5ba5ba7 Also initialize the kernel_args::driver_settings to be on the safe side.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-14 17:35:46 +00:00
Axel Dörfler
8270381cd9 Added work-in-progress HFS stuff to the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-14 15:36:20 +00:00
Axel Dörfler
4a3b7efb91 Some unfinished work-in-progress.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-14 15:32:12 +00:00
Axel Dörfler
cc8aae32ee We're using now Ingo's new doubly linked list implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-03 06:15:16 +00:00
Axel Dörfler
133c5b73a2 Obviously, my laptop (SiS 630 based) only reports all VESA modes when there
was one mode change before - took me quite some time to figure this out; now
we just do a mode change to the standard text mode; this is probably a good
idea anyway to make sure we're running in the correct text mode for the boot
menu.
The error check for the VESA BIOS calls were not really correct, even if
they worked. The vbe_mode_info structure is now cleared before the mode
info is requested (as suggested in Ralf Brown's interrupt list).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 15:35:59 +00:00
Axel Dörfler
1252c6cfae No longer computes a wrong frame buffer size for 15 bit modes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-12 03:12:19 +00:00
Axel Dörfler
b460825e1f Fixed the bug that prevented the boot loader from running on many current
systems: good old A20 gate was not properly enabled on all hardware. Even
if it's not perfect now, either, it seems to work on many more systems
(all I have access to, anyway).
Please report if you have any issues with the 0x92 port A20 gate method.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 03:15:26 +00:00
Axel Dörfler
5042346db6 Fixed broken conditional ENABLE_SERIAL handling.
Also added a comment about what ENABLE_SERIAL is for.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 03:01:39 +00:00
Axel Dörfler
21bdfb9cf9 Moved the "random spots" for the first two page tables to 0x91000 and 0x92000
respectively; the area from 0x9f000-0x100000 is not really usable anyway, so
we can safely cut down the maximum size of the boot loader to around 500 kB.
Therefore, the first free physical page is now at 0x100000 straight.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 02:59:04 +00:00
Ingo Weinhold
164d84bb10 Switched to new DoublyLinkedList class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 02:35:16 +00:00
Ingo Weinhold
b0f7c84522 Switched to new DoublyLinkedList class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 02:19:23 +00:00
Axel Dörfler
623d7696c0 Added a platform_register_boot_device() stub function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-20 17:40:46 +00:00
Axel Dörfler
486c7eddeb Added driver_settings support: it will now read in the vesa kernel driver
settings and use that one as standard video size (but ignores the depth
parameter for now).
It will be the app_server's responsibility to keep this file up to date.
This file should no longer be edited by users.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:41:01 +00:00
Axel Dörfler
4c89c923bf For now doesn't switch to text mode and back to the logo anymore when the
menu is shown - the logo is now shown after the menu anyway.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:38:01 +00:00
Axel Dörfler
78c5ef46fc Added driver_settings support.
It will now load all settings in the kernel driver settings directory
and pass them over to the kernel (unparsed).
Additionally, it allows other parts of the boot loader to access
driver_settings just like in the kernel.
Moved the switch to the logo in the boot loader much further to the end
of the boot loader's life cycle. This is done so that the boot loader
can directly use the video mode as configured in Haiku, without a jumping
logo. Since the delay will be noticeable on a real system, we might want
to introduce a second different boot logo, though. We'll see.
stdio.cpp now also exports errno (and _errnop). Might be changed to a
different approach later as well (it's now done this way so that strtol.o
can be taken over unchanged from libroot.so).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:32:54 +00:00
Axel Dörfler
f79889e75b Now also sets the cpu_clock_speed field.
Disabled debug output.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 20:59:55 +00:00
Axel Dörfler
caa0ef0b4c Some old changes, probably shouldn't get lost, even if this boot method
is not being used by the PPC anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:37:56 +00:00
Axel Dörfler
058569262f get_memory_map() is now silent when TRACE_MMU is not defined.
When the 0xe820 memory map method doesn't work for whatever reason (broken BIOS),
it currently just assumes to have 32 MB - it now also prints out a warning when
it does so.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:33:46 +00:00
Axel Dörfler
50f99a085e Now properly allocates the kernel stacks of the other CPUs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 22:04:12 +00:00
Axel Dörfler
0641ddaabc Now uses the KERNEL_STACK_SIZE constant to allocate the idle thread kernel stacks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-19 21:56:45 +00:00
Axel Dörfler
17e0266f6e Implemented platform_register_boot_device(): it parses drive_parameters
versions 2.x and 3.x and fills the disk_identifier of the boot disk.
"Dumb" checksum/size recognition is not yet implemented (stores only the
size of the disk for now).
Does not yet create bios_drive structures for any other drives.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:11:27 +00:00
Axel Dörfler
04b9d56a03 register_boot_file_system() now also fills in the kernel_args data about
the boot partition, and calls platform_register_boot_device() for the
rest.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:06:47 +00:00
Axel Dörfler
925f2cab6a get_node_for() has moved into the public VFS API for now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:05:01 +00:00
Axel Dörfler
5d6160d04e panic() now reboots when you press a key.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:03:56 +00:00
Axel Dörfler
356f4957fa Added a function that clears the keyboard buffer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:02:50 +00:00
Axel Dörfler
8a4b1da1e7 Corrected the information where the real/protected mode stacks begin; the
comment did not take the BIOS data area into account.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 18:01:52 +00:00
Axel Dörfler
8c3e1399ec Thanks to Johannes Fortmann, I learned that the blinking mode can be turned
off to enable bright background colors. It's now always done which enabled
me to improve the slider colors a bit.
Therefore, console_set_color() no longer clears bit 8 from the background color.

Now no longer tries to change the palette in non-8-bit modes; that fixes
the strange colors I got in high and true color modes (VESA palette changing
would fail and the fallback VGA palette changing was responsible for the effect).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 15:43:27 +00:00
Axel Dörfler
73760b2058 Moved serial interface code into separate file.
serial_init() is now called from start().
Changed the way the serial debug output is served: instead of having
the console node to dump everything to serial, too, only dprintf()
triggers serial output now.
dprintf() is now silent unless in debug mode; serial output could
be enabled separetely, though (currently only at build time).
There is no need to disable serial output while the menu is running.
Removed unnecessary grist from the Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 03:02:34 +00:00
Axel Dörfler
5a7a832f37 Debug output now uses dprintf() rather than printf().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:35:56 +00:00
Axel Dörfler
1baf43ea86 Since my original color setup only looked good in Bochs (on real machines
some stuff blinked and had wrong colors), we now have a new color scheme
in the boot loader. Not perfect, but looks okay and the same on Bochs and
real machines.
Made changing the colors again easier by moving most colors to constants.
We now have 3 lines for help texts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:31:41 +00:00
Axel Dörfler
cdd04333a0 Standard console height are 25 lines, not just 24.
Now clears the screen and scrolls using the current colors (which allows
for other background colors than black).
console_set_color() no longer allows to set the 8 bit of the background
color which indicates blinking.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:28:27 +00:00
Axel Dörfler
d70ad16601 Changed the console color names to something simpler and better fitting.
Added comments about which colors can be used for what (unlike Bochs,
real systems support blinking modes, and therefore only 7 bits for
the background color).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:25:28 +00:00
Axel Dörfler
92e0317c84 Disabled VESA palette changing for now; it does not seem to work correctly
or I am messing things up (it will now use good old VGA palette programming).
This fixes the strange colors on my system, should investigate on how to
properly use the VESA stuff here.
Debug output now goes through dprintf().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:23:42 +00:00
Axel Dörfler
d3b2cb65ad Now properly resets the system using the keyboard controller.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:20:59 +00:00
Axel Dörfler
74a5be2dbd No longer clobbers the lower 16 bit of the partition offset before it is saved.
The boot partition was not likely to be found before.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:20:06 +00:00
Axel Dörfler
8ba84a800d Partitions do now know if they actually represent a known partitioning system.
Now correctly removes the partitioning system from a device when it is no longer
needed. Also resets the parent pointer of its children.
Debug output now goes through dprintf() rather than printf().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:17:58 +00:00
Axel Dörfler
127b80eca2 Fixed a bug when the wanna-be boot partition could not been mounted;
the partition was deleted, but never removed from the partition list.
No longer prints out the root directory contents of all file systems.
Debug output now uses dprintf() rather than printf().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:15:31 +00:00
Axel Dörfler
b487348fb3 Now only use dprintf() for debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:13:18 +00:00