Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
There's no need for StaticParser to be a separate thing from Parser.
|
|
|
|
There was a frequently occurring pattern of "map this physical address
into kernel VM, then read from it, then unmap it again".
This new typed_map() encapsulates that logic by giving you back a
typed pointer to the kind of structure you're interested in accessing.
It returns a TypedMapping<T> that can be used mostly like a pointer.
When destroyed, the TypedMapping object will unmap the memory. :^)
|
|
If we don't support ACPI, just don't instantiate an ACPI parser.
This is way less confusing than having a special parser class whose
only purpose is to do nothing.
We now search for the RSDP in ACPI::initialize() instead of letting
the parser constructor do it. This allows us to defer the decision
to create a parser until we're sure we can make a useful one.
|
|
Construct the parser, no matter which kind, in ACPI::initialize().
|
|
|
|
String.h no longer pulls in StringView.h. We do this by moving a bunch
of String functions out-of-line.
|
|
|
|
Let's rip off the band-aid
|
|
Also, the definition of the HPET ACPI table is correct now, in
accordance to the HPET specification, revision 1.0a, October 2004.
|
|
|
|
Also, the switch-case flow is simplified for IO access within a Generic
address strucuture's handling.
|
|
|
|
Also, we determine if ACPI reboot is supported by checking the FADT
flags' field.
|
|
|
|
This also makes it easier to automatically parse the dependency tree.
Thankfully, this is the only place where a change was necessary.
|
|
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
|
|
|
|
LogStream can handle VirtualAddress and PhysicalAddress directly.
|
|
Also, GenericInterruptHandler class requires to implement two new
methods.
|
|
|
|
|
|
Now we call ACPI reboot method first if possible, and if ACPI reboot is
not available, we attempt to reboot via the keyboard controller.
|
|
Also, duplicate data in dbg() and klog() calls were removed.
In addition, leakage of virtual address to kernel log is prevented.
This is done by replacing kprintf() calls to dbg() calls with the
leaked data instead.
Also, other kprintf() calls were replaced with klog().
|
|
Also, the functions for StaticParsing namespace were added.
Therefore, some early access functionality is being used also
in ACPI::StaticParser class.
|
|
More namespaces have been added to organize the declarations
in a more sensible way.
Also, a namespace StaticParsing has been added to allow early
access to ACPI tables.
|
|
|
|
|
|
|
|
Now the DMIDecoder code is more safer, because we don't use raw pointers
or references to objects or data that are located in the physical
address space, so an accidental dereference cannon happen easily.
Instead, we use the PhysicalAddress class to represent those addresses.
Also, the initializer_parser() method is simplified.
|
|
Instead of setting the smart pointers to be nullptr in the
initializer list, it's done automatically by OwnPtr.
|
|
Now the ACPI & PCI code is more safer, because we don't use raw pointers
or references to objects or data that are located in the physical
address space, so an accidental dereference cannot happen easily.
Instead, we use the PhysicalAddress class to represent those addresses.
|
|
|
|
|
|
Also, definitions were added for MADT entries, like IOAPIC and GSI
overriding information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit 6c72736b26a81a8f03d8dd47989bfffe26bb1c95.
I am unable to boot on my home machine with this change in the tree.
|
|
System components that need an IRQ handling are now inheriting the
InterruptHandler class.
In addition to that, the initialization process of PATAChannel was
changed to fit the changes.
PATAChannel, E1000NetworkAdapter and RTL8139NetworkAdapter are now
inheriting from PCI::Device instead of InterruptHandler directly.
|
|
The problem was mostly in the initialization code, since in that stage
the parser assumed that there is an identity mapping in the first 1MB of
the address space. Now during initialization the parser will create the
correct mappings to locate the required data.
|
|
DMIDecoder creates the mappings using the standard helpers, thus no
need to rely on the identity mapping in the first 1MB in memory.
|