summaryrefslogtreecommitdiff
path: root/arch/x86/machine/biosmem.c
AgeCommit message (Collapse)Author
2017-08-04vm/vm_page: rename vm_page_atop and vm_page_ptoaRichard Braun
Talk about "bytes" instead of "addresses" for better clarity.
2017-07-13Switch to initialization operationsRichard Braun
2017-06-25Remove the param moduleRichard Braun
Move the page properties into the new x86/page module, and the virtual memory layout macros into the x86/pmap module.
2017-06-25Move physical memory properties into the new x86/pmem moduleRichard Braun
2017-06-10x86/biosmem: fix log argument typeRichard Braun
2017-06-10Use log functions where appropriateRichard Braun
2017-05-30Move assert.h to the include directoryRichard Braun
This turns assert.h into a standard header.
2017-05-19x86/uart: new moduleRichard Braun
2017-04-29New stdio.h standard headerRichard Braun
Make kernel code obtain definitions for the printf family of functions through the inclusion of the standard stdio.h header.
2017-04-29kern/printk: rename to printfRichard Braun
The printk functions are close enough to the printf ones to bear the same names.
2017-04-05x86/biosmem: use boot_memcpy to copy structuresRichard Braun
This change prevents the compiler from generating calls to memcpy at a time when the memcpy function isn't yet mapped.
2017-02-04Fix printf-format related warningsRichard Braun
2017-02-04Clean up compilationRichard Braun
Instead of mixing standard headers and internal redefinitions of standard types, completely rely on the compiler for what is guaranteed for a free standing environment. This results in the removal of kern/stddef.h and kern/stdint.h. The kern/types.h header is reintroduced for the different (and saner) purpose of defining types not specified in standard C, namely ssize_t for now.
2017-02-04kern/types: split into module-specific type headersRichard Braun
Using a single header for all types causing inclusion circular dependencies isn't very elegant and doesn't scale.
2017-01-12Rename VM page segments to zonesRichard Braun
The segments are modeled after the Linux zones, so let's just use that name. Besides, it avoids confusion with x86 segments.
2016-12-09Force brackets around one-line conditional statementsRichard Braun
This change was done using astyle, with a few manual editing here and there.
2016-10-27x86/biosmem: fix call to panicRichard Braun
Sanitize a call to panic with the same constraints as for printf.
2016-09-05x86/biosmem: only report memory map if debugging is enabledRichard Braun
2016-09-05x86/biosmem: explicitely track boot dataRichard Braun
Even after its last rework, the biosmem module suffered a number of problems. First, the biosmem_find_heap function was too naive, and may have fail if the boot data were not properly sorted. Second, the biosmem_free_usable function forced the user to save all boot data, and would fail in a way similar to biosmem_find_heap depending on the memory map, the kernel and the heap ranges. This change finally brings a true solution to the problem of early allocation by properly tracking all boot data in a sorted array. When registering boot data, the user can mark them temporary, so that they're automatically unregistered when releasing additional memory once the VM system is ready. It also makes the biosmem module a lot less dependent on the multiboot information, using them only to build its internal memory map. The registration of boot data is now performed by the boot module.
2016-09-05x86/biosmem: remove biosmem_set_bootalloc_policyRichard Braun
This function was added with the expectation that it would be used by another module, but it turns out it's not needed.
2016-09-05x86/biosmem: minor stylistic changeRichard Braun
Rename biosmem_panic_toobig_msg to biosmem_panic_too_big_msg.
2016-09-05x86/biosmem: minor stylistic changeRichard Braun
Use a column instead of a dash when reporting address ranges for consistency.
2016-09-02x86/biosmem: make details reporting conditionalRichard Braun
2016-09-02x86/biosmem: minor changesRichard Braun
Explicitely mention that pages returned by the biosmem boot allocator are part of the direct physical mapping. Harden biosmem_free_usable.
2016-09-02x86/biosmem: rework boot allocator setupRichard Braun
Make the code clearly state what it's actually doing without changing what it does much. The most important change is that biosmem_find_boot_data, a very confusing function, has been renamed biosmem_find_heap, and was rewritten accordingly.
2016-09-02x86/biosmem: fix segment loadingRichard Braun
For some misguided reason, the previous code assumed that a segment that didn't overlap with the heap was completely available. Instead assume it's completely unavailable, and rely on biosmem_free_usable to add any page that can be used at a later time.
2016-09-02x86/biosmem: implement both top-down and bottom-up policiesRichard Braun
2016-09-02x86/biosmem: rename biosmem_directmap_sizeRichard Braun
Rename this function to biosmem_directmap_end, to better reflect what it actually does.
2015-08-26biosmem: fix boundary checking when loading segmentsRichard Braun
2014-12-10x86/{boot,biosmem}: directmap updateRichard Braun
The main impact of the direct physical mapping on the biosmem module is that the BIOS-provided memory map must be processed before paging is enabled, which forces all related code and data to move to the .boot section.
2014-12-06x86/biosmem: minor type changeRichard Braun
2014-12-06x86/biosmem: minor coding style changeRichard Braun
2014-08-30x86/biosmem: improve clarityRichard Braun
2014-01-08x86/boot: improve early error reportingRichard Braun
Move the error strings to the boot data section. In addition, add some assembly code to report that a processor doesn't support long mode.
2013-07-09vm/vm_phys: merge into the vm_page moduleRichard Braun
The original idea was to separate physical page allocation from page list management, but it doesn't make much sense any more.
2013-07-05x86/biosmem: don't load physically unreachable memoryRichard Braun
2012-12-31x86/strace: handle symbol tableRichard Braun
If passed by the boot loader, the stack tracing module can use the symbol table to resolve addresses when forging the call trace.
2012-12-25x86/boot: reintroduce the .boot sectionRichard Braun
User task bootstrapping is an init-only process, but it's done with the task address space loaded, which conflicts with the low addresses the .init section is linked at. Create a .boot section for the early initialization code and data, and move the .init section at high addresses.
2012-12-22vm/vm_phys: add segment allocation functionRichard Braun
Architecture specific code sometimes has constraints on the location of some data structures in physical memory. This interface provides a simple way to allocate physical memory from segments that fulfill these constraints. If they are stronger, or needed by machine independent code, another (more complicated) interface will be needed.
2012-12-01Normalize calls to panicRichard Braun
Always prefix messages with the current module name.
2012-11-03Merge lib into kernRichard Braun
There are no precise enough criteria to justify the separation of these two directories.
2012-10-15x86/param: update physical memory configurationRichard Braun
Add amd64 properties, and increase PAE limit to 52 bits.
2012-10-15x86/pmap: rewrite to support both i386 and amd64Richard Braun
This new code handles 32-bit (including PAE, as before) and 64-bit paging. A few macros and tables only are adjusted depending on the selected mode.
2012-10-12x86/multiboot: improve 64-bit cleannessRichard Braun
Raw multiboot data carry almost exclusively 32-bit values and addresses. This is a problem as they were also used to store the address of copies in kernel space. When the kernel is built for amd64, these structures can no longer store the address of copies. This change fixes the issue by introducing new structures, independent of any specified format, to store the relevant boot data during initialization.
2012-10-10Rename vm_phys_t to phys_addr_tRichard Braun
2012-10-10x86: rework the linker scriptRichard Braun
Merge the .boot section into the .init section, and set the .init section at physical addresses.
2012-10-10x86: merge the init and boot modulesRichard Braun
There is actually already an existing init module, in kern. Avoid name issues and call the result "boot".
2012-10-03x86: new architectureRichard Braun
Merge 32-bit IA-32 (i386) and 64-bit AMD64 (amd64) code into one common architecture. The amd64 variant isn't functional yet.