1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00

262 Commits

Author SHA1 Message Date
Achilleas Anagnostopoulos
7bcaf0ee8d vmm: implement identity mapping function for contiguous physical mem regions
vmm.IdentityMapRegion can be used by device drivers that want to
establish an identity mapping for a contiguous physical memory block in
order to access some hardware or table.
2017-08-28 07:28:04 +01:00
Achilleas Anagnostopoulos
0a271b206b pmm: implement FrameFromAddress
This is equivalent to vmm.PageFromAddress but returns back a pmm.Frame
2017-08-28 07:28:04 +01:00
Achilleas Anagnostopoulos
324022187d Merge pull request #51 from achilleasa/fix-vga-text-palette-mapping
Map EGA color indices to correct DAC entries for VGA HW
2017-08-19 11:07:28 +01:00
Achilleas Anagnostopoulos
d17298acaa vga_text: Map EGA color indices to correct DAC entries for the VGA hw 2017-08-19 10:33:38 +01:00
Achilleas Anagnostopoulos
08c845a9ac Use the correct CI env name 2017-08-08 23:57:54 +01:00
Achilleas Anagnostopoulos
9838f468a7 Fix minor typo in BUILD.md 2017-08-08 23:42:25 +01:00
Achilleas Anagnostopoulos
301024eb89 Merge pull request #49 from achilleasa/improve-readme
Improve documentation
2017-08-08 23:38:27 +01:00
Achilleas Anagnostopoulos
b5bd7da046 Update readme 2017-08-08 23:34:24 +01:00
Achilleas Anagnostopoulos
63e9f40d47 Add build guide 2017-08-08 23:34:19 +01:00
Achilleas Anagnostopoulos
c778693de0 Merge pull request #48 from achilleasa/vbox-make-target
Add Makefile target for running gopher-os ISO using vbox
2017-08-08 23:24:15 +01:00
Achilleas Anagnostopoulos
cb0f7312cf Add vbox run target to the Makefile and rename run target to run-qemu 2017-08-08 23:11:59 +01:00
Achilleas Anagnostopoulos
2549dc9837 Add contributing and status markdown files 2017-08-08 22:56:58 +01:00
Achilleas Anagnostopoulos
4b25971cef Merge pull request #47 from achilleasa/order-based-driver-probing
Order based driver detection/loading
2017-07-18 08:37:58 +01:00
Achilleas Anagnostopoulos
b53912757c Refactor hal code to use preferred driver detection order 2017-07-18 08:27:50 +01:00
Achilleas Anagnostopoulos
1ef27b3226 Update device drivers to use the device.RegisterDriver 2017-07-18 08:26:56 +01:00
Achilleas Anagnostopoulos
d180348116 Define DriverInfo and registration helpers 2017-07-18 08:23:43 +01:00
Achilleas Anagnostopoulos
a86a1bd8cd Merge pull request #46 from boomshroom/patch-1
Check grub on non-dpkg systems.
2017-07-17 07:36:30 +01:00
me
93e2985473 Check grub on non-dpkg systems.
Also makes checking for grub-mkrescure more in line with the check for xorriso.
2017-07-16 21:32:25 -07:00
Achilleas Anagnostopoulos
37e32d9960 Provide correct implementation for cpu.FlushTLBEntry
The previous version worked under qemu (or qemu does not implement TLB
caching) but caused an unrecoverable page fault when running under
virtualbox.
2017-07-15 17:25:04 +01:00
Achilleas Anagnostopoulos
a05c135355 Merge pull request #45 from achilleasa/enable-support-for-defer
Enable support for defer
2017-07-14 08:11:37 +01:00
Achilleas Anagnostopoulos
66d471f442 Defer kernel panic when Kmain returns 2017-07-14 08:05:59 +01:00
Achilleas Anagnostopoulos
ccba8877ce Enable support for deferred calls 2017-07-14 08:05:54 +01:00
Achilleas Anagnostopoulos
9567f259bd Set m.curg = g0 2017-07-14 07:45:56 +01:00
Achilleas Anagnostopoulos
bc52b65615 Merge pull request #44 from achilleasa/implement-vesa-fb-console-driver
Implement vesa fb console driver with support for bitmap fonts and logos
2017-07-14 06:16:52 +01:00
Achilleas Anagnostopoulos
16ad4c856e Set framebuffer tag in multiboot header and add vesa grub menu entries 2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
eaeae85600 Implement LogoSetter interface for vesa fb driver 2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
c7fc9f0ac9 Add gopher logos (64, 96 and 128 pixels tall)
The gopher images were obtained from: https://github.com/golang-samples/gopher-vector
2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
4af2ed62a0 Display the best-fit logo on logo-capable console devices
Logos can be disabled by passing the "consoleLogo=off" boot command line
parameter.
2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
cb7ae66556 Define LogoSetter interface and BestFit selection helper 2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
a5c6828fc2 Create tool for converting images to compatible console logo files
The tool processes an image and converts it to a logo.Image struct which
can be assigned to a logo-capable console.
2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
99977294aa Disable bounds-checking for release builds and use std vga with qemu
By passing "-std vga" to qemu we can access all sorts of useful
resolutions for testing the kernel (e.g 2560x1600x32)
2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
540f288e61 Select appropriate font for console devices with font support
The hal package automatically selects the best font from the list of
available fonts based on the console dimensions and the font priorities. The font
selection can be overriden by passing the "consoleFont" boot commandline
parameter to the kernel (e.g. consoleFont=terminus8x16)
2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
d71c4c1eea Add 8x16, 10x18 and 14x28 fonts based on the terminus font 2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
72feb11acb Document exported symbols 2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
f4f3745073 Extend vesa driver support to 15 and 16bpp framebuffers 2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
f02c767257 Extend vesa driver to support 24 and 32 bpp 2017-07-13 23:35:20 +01:00
Achilleas Anagnostopoulos
13ba4bbbed Implement vesa console driver for 8bpp framebuffers 2017-07-13 23:35:10 +01:00
Achilleas Anagnostopoulos
cbf0c82702 Change Dimensions() signature to support querying for characters or pixels 2017-07-13 22:06:50 +01:00
Achilleas Anagnostopoulos
952d0bf4a5 Define FontSetter interface, the Font type and helper methods
The helper methods provide support for selecting the best-fit font for
the console dimensions and for looking up a font by name.
2017-07-13 22:06:50 +01:00
Achilleas Anagnostopoulos
4e5cee30ba Merge pull request #43 from achilleasa/setup-granular-pdt-for-kernel
Setup granular PDT for kernel
2017-07-13 06:57:01 +01:00
Achilleas Anagnostopoulos
6195f3fc3b Setup a more granular PDT based on the ELF image section addresses 2017-07-13 06:35:22 +01:00
Achilleas Anagnostopoulos
cc4364f55c Pass the virtual page offset for the kernel to kernel.Kmain
Ths page offset is defined in arch/XXX/constants.inc and needs to be
passed to the kernel so we can correctly calculate the physical frame
addresses that correspond to the ELF section virtual memory addresses.
2017-07-13 00:08:40 +01:00
Achilleas Anagnostopoulos
a2d58f8949 Switch to a visitor-based no-alloc implementation for fetching ELF sections
This change is required as the code to create a new PDT should execute
before the Go allocator is bootstrapped.
2017-07-13 00:08:40 +01:00
Achilleas Anagnostopoulos
fdd5611220 Fix bug in the ASM code used to load the PDT to the CR2 register
The previous implementation in Go assembly did not translate to the
correct assembly instructions for loading CR2
2017-07-13 00:08:40 +01:00
Achilleas Anagnostopoulos
4e0ad81770 Reload GDT with the descriptor VMA once the CPU switches to 64-bit mode
The GDT is initially loaded in the 32-bit rt0 code where we cannot use
the 48-bit VMA for the GDT table and instead we use its physical
address. This approach works as the rt0 code establishes an identity
mapping for the region 0-8M. However, when the kernel creates a more
granular PDT it only includes the VMA addresses for the kernel ELF image
sections making the 0-8M invalid. Unless the GDT is reloaded with the
VMA of the table, the CPU will cause a non-recoverable page fault when
it tries to restore the segment registers while returning from a
recoverable page fault.
2017-07-13 00:08:40 +01:00
Achilleas Anagnostopoulos
9d2e53bac4 Redirect runtime.init to an empty stub 2017-07-13 00:08:35 +01:00
Achilleas Anagnostopoulos
8a0fd0ade4 Merge pull request #42 from achilleasa/parse-additional-multiboot-tags
Parse additional multiboot tags
2017-07-10 19:23:44 +01:00
Achilleas Anagnostopoulos
a79be7c268 Support parsing of 64-bit ELF section tags off from the multiboot data 2017-07-10 19:08:28 +01:00
Achilleas Anagnostopoulos
af9613e336 Support extraction of boot cmdline off the multiboot data 2017-07-10 19:05:49 +01:00
Achilleas Anagnostopoulos
5ef344010b Support parsing of framebuffer color info out of the multiboot data 2017-07-10 19:05:01 +01:00