summaryrefslogtreecommitdiff
path: root/Kernel/ACPI
AgeCommit message (Collapse)Author
2020-04-09Kernel: Reorder bitwise operations when creating PCI interrupt overridesLiav A
2020-04-09MultiProcessor: Silence debug message spamLiav A
2020-04-09Interrupts: Make the MultiProcessorParser functional againLiav A
2020-04-09Kernel: Remove redundant "ACPI" from filenames in ACPI/Andreas Kling
2020-04-09Kernel: Merge ACPI::StaticParser into ACPI::ParserAndreas Kling
There's no need for StaticParser to be a separate thing from Parser.
2020-04-09Kernel: Use StringView for ACPI table signaturesAndreas Kling
2020-04-09Kernel: Add typed_map<T>(PhysicalAddress) and use it in ACPI parsingAndreas Kling
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. :^)
2020-04-09Kernel: Remove "non-operational" ACPI parser stateAndreas Kling
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.
2020-04-09Kernel: Simplify ACPI initialization a bitAndreas Kling
Construct the parser, no matter which kind, in ACPI::initialize().
2020-04-09Kernel: Move ACPI initialization from init.cpp to ACPI::initialize()Andreas Kling
2020-03-23AK: Reduce header dependency graph of String.hAndreas Kling
String.h no longer pulls in StringView.h. We do this by moving a bunch of String functions out-of-line.
2020-03-22Kernel: Fix compilation error with ACPI_DEBUG enabledShannon Booth
2020-03-22Kernel: Run clang-format on filesShannon Booth
Let's rip off the band-aid
2020-03-19ACPI: Delete irrelevant HPET definitionsLiav A
Also, the definition of the HPET ACPI table is correct now, in accordance to the HPET specification, revision 1.0a, October 2004.
2020-03-19Kernel: Use a const reference to RegisterState in IRQ handlingLiav A
2020-03-12ACPI: Examine bit width in Generic address structure before assertingLiav A
Also, the switch-case flow is simplified for IO access within a Generic address strucuture's handling.
2020-03-12ACPI: Keep common flags in structures for later usageLiav A
2020-03-09Kernel: Allow to reboot in ACPI via PCI or MMIO accessLiav A
Also, we determine if ACPI reboot is supported by checking the FADT flags' field.
2020-03-09LibBareMetal: Return FlatPtr from PhysicalAddress::offset_in_page()Liav A
2020-03-08Kernel: Fix inconsistent inclusion styleBen Wiederhake
This also makes it easier to automatically parse the dependency tree. Thankfully, this is the only place where a change was necessary.
2020-03-08AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)Andreas Kling
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.
2020-03-06Meta: Claim copyright on `ACPI` filesLiav A
2020-03-06Kernel: Simplify a bunch of dbg() and klog() callsAndreas Kling
LogStream can handle VirtualAddress and PhysicalAddress directly.
2020-03-06Kernel: Change HandlerPurpose to HandlerTypeLiav A
Also, GenericInterruptHandler class requires to implement two new methods.
2020-03-06Kernel: Print MultiProcessor featuresLiav A
2020-03-05Kernel: Run clang-format on Process.cpp & ACPIDynamicParser.hLiav A
2020-03-05Kernel: Call ACPI reboot method first if possibleLiav A
Now we call ACPI reboot method first if possible, and if ACPI reboot is not available, we attempt to reboot via the keyboard controller.
2020-03-02Kernel: Use klog() instead of kprintf()Liav A
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().
2020-02-29ACPI: Adopt the changes in the definitions fileLiav A
Also, the functions for StaticParsing namespace were added. Therefore, some early access functionality is being used also in ACPI::StaticParser class.
2020-02-29ACPI: Reorganize the definitions fileLiav A
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.
2020-02-27ACPIStaticParser: Use dbg() instead of dbgprintf()Liav A
2020-02-27DMIDecoder: Use dbg() instead of dbgprintf()Liav A
2020-02-27Kernel: Run clang-format on DMIDecoder header fileLiav A
2020-02-27Kernel: Don't use references or pointers to physical addressesLiav A
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.
2020-02-24ACPI: Don't set Smart Pointers to be nullptrLiav A
Instead of setting the smart pointers to be nullptr in the initializer list, it's done automatically by OwnPtr.
2020-02-24Kernel: Don't use references or pointers to physical addressesLiav A
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.
2020-02-24Kernel: Update system components to use the new IRQHandler classLiav A
2020-02-24ACPI: Run clang-format on the definitions fileLiav A
2020-02-24ACPI: Adding definitions for HPETLiav A
Also, definitions were added for MADT entries, like IOAPIC and GSI overriding information.
2020-02-24Kernel: Fix a wrong debug message in ACPIStaticParserLiav A
2020-02-24Kernel: Add MultiProcessor ParserLiav A
2020-02-16Kernel: Reduce header dependencies of MemoryManager and RegionAndreas Kling
2020-02-16Kernel: Move all code into the Kernel namespaceAndreas Kling
2020-02-09Kernel: Use VirtualAddress & PhysicalAddress classes from LibBareMetalLiav A
2020-02-09Kernel: Apply changes to use LibBareMetal definitionsLiav A
2020-02-08Kernel: Merge unnecessary DiskDevice class into BlockDeviceAndreas Kling
2020-01-22Revert "Kernel: Replace IRQHandler with the new InterruptHandler class"Andreas Kling
This reverts commit 6c72736b26a81a8f03d8dd47989bfffe26bb1c95. I am unable to boot on my home machine with this change in the tree.
2020-01-22Kernel: Replace IRQHandler with the new InterruptHandler classLiav A
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.
2020-01-21Kernel: ACPI code doesn't rely on identity mapping anymoreLiav A
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.
2020-01-21Kernel: DMIDecoder no longer depends on identity-mappingLiav A
DMIDecoder creates the mappings using the standard helpers, thus no need to rely on the identity mapping in the first 1MB in memory.