[FREELDR] Minor enhancements for disk/partition boot and UI.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 13 Aug 2019 15:34:57 +0000 (17:34 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 13 Aug 2019 21:07:01 +0000 (23:07 +0200)
commit85d44fca5923089cd10e03efe58c4854a2b8b176
tree2dabe6af5820e6a6cde40cfb58d47e86ed47ef75
parent4578ee3e2098647c8c4254f3ceb532c0b5815176
[FREELDR] Minor enhancements for disk/partition boot and UI.

- Factor out disk & partition opening in LoadAndBootPartition() and
  LoadAndBootDrive() into a LoadAndBootPartitionOrDrive() helper.

- Use ARC paths and ArcOpen()/ArcRead() instead of calling the
  machine-specific BIOS-oriented DiskGetPartitionEntry() and
  MachDiskReadLogicalSectors() functions to open the disk/partition
  and read their boot sectors.

- Don't forget to close the opened boot sector file in LoadAndBootBootSector().

- Add assertions for DiskReadBufferSize in PcMemFinalizeMemoryMap()
  and EnumerateHarddisks().

- x86/amd64 only:
  * Add a DisableA20 helper for disabling the A20 line, before rebooting
    back, or chain-load a boot sector, into 16-bit world.
    Also pulse the output port of the keyboard controller to clear out
    its state after having set the state of the A20 line.

  * In addition to disabling the A20 line when rebooting or chain-loading
    a boot sector, reset the video back to 80x25 text mode.

- Reset the cursor position back to the origin when initializing or
  terminating the TUI.
boot/freeldr/freeldr/arch/i386/hwdisk.c
boot/freeldr/freeldr/arch/i386/pcmem.c
boot/freeldr/freeldr/arch/realmode/helpers.inc
boot/freeldr/freeldr/disk/disk.c
boot/freeldr/freeldr/include/arch/pc/pcbios.h
boot/freeldr/freeldr/miscboot.c
boot/freeldr/freeldr/ui/tui.c