Skip to content

Commit 0bd9977

Browse files
Merge pull request #4 from mebrahimaleem/apic
APIC and IOAPIC drivers. ACPICA stubs with minimal osl. Working local APIC timer interrupts at 50ms
2 parents 5f3468b + dae2e1a commit 0bd9977

326 files changed

Lines changed: 147408 additions & 502 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 0 additions & 103 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run test suite
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install apt packages
15+
run: |
16+
sudo apt update
17+
sudo apt install clang lld llvm grub-efi-amd64-bin mtools
18+
19+
- name: Build ModulOS
20+
run: |
21+
make -j$(nproc) build
22+
23+
- name: Run test suite
24+
run: |
25+
make test-all | tee build/test-log.txt
26+
27+
- name: Archive debugging symbols
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: dbg-symbols
31+
path: build/modulos-dbg
32+
retention-days: 2
33+
34+
- name: Archive testsuite log
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: testsuite-log
38+
path: build/test-log.txt
39+
retention-days: 2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ tags
88
compile_commands.json
99

1010
!.gitignore
11+
!.github

INSTALL

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,10 @@ By default, debugging related logging is disabled and optimizations are enabled.
66

77
The built modules can be customized by commenting/uncommenting the various `export BUILD_<MODULENAME> = 1` lines near the beginning of the top level Makefile
88

9-
## Cross Compilation Instructions
9+
ModulOS must be compiled with clang/lld. The following packages are also needed:
10+
- mtools
11+
- x86_64-efi grub
12+
- llvm binary utilities
1013

11-
- binutils 2.45 was built with the following configuration: `--target=x86_64-elf --program-prefix=x86_64-elf- --with-sysroot --disable-nls --disable-werror`
12-
13-
- gcc 15.2.0 was built with the following configuration: `--target=x86_64-elf --program-prefix=x86_64-elf- --disable-nls --enable-languages=c --without-headers`
14-
15-
- grub 2.06 was built with the following configuration: `--with-platform=efi --target=x86_64 --program-prefix=x86_64-elf- --with-sysroot --disable-nls --disable-werror CFLAGS='-std=gnu99'`
16-
17-
18-
- Patch files can be found in `contrib/`
19-
20-
The compiler and binutils should be built in the following order:
21-
22-
1. Build and install binutils: `make && make install`
23-
2. Patch gcc source using noredzone.patch
24-
3. Build and install gcc: `make all-gcc && make install-gcc`
25-
4. Try building libgcc (this will fail due to PIC being enabled): `make all-target-libgcc CFLAGS_FOR_TARGET='-g -O2 -mcmodel=kernel' || true`
26-
5. Patch gcc `objdir/x86_64-elf/libgcc/Makefile`: `sed -i 's/PICFLAG/DISABLED_PICFLAG/g' x86_64-elf/libgcc/Makefile`
27-
6. Patch gcc `objdir/x86_64-elf/libgcc-noredzone/libgcc/Makefile`: `sed -i 's/PICFLAG/DISABLED_PICFLAG/g' x86_64-elf/libgcc-noredzone/libgcc/Makefile`
28-
7. Rebuild and install libgcc: `make all-target-libgcc CFLAGS_FOR_TARGET='-g -O2 -mcmodel=kernel' && make install-target-libgcc`
29-
30-
Grub can be built the same way as binutils
31-
Optionally, gdb can be built the same way as binutils
14+
On debian based systems, all dependencies can be installed with the apt package manager:
15+
`apt install clang lld llvm grub-efi-amd64-bin mtools`

LICENSES/ACPICA

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
The ACPICA source code has been modified in the following ways on January 9th 2026:
2+
* The platform/acmodulos.h file as been added, heavily based on platform/aclinux.h and platform/aclinuxex.h
3+
* The platform/acenv.h file now includes platform/acmodulos.h
4+
5+
Most of ACPICA is under the following license:
6+
7+
1. Copyright Notice
8+
9+
Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
10+
All rights reserved.
11+
12+
2. License
13+
14+
2.1. This is your license from Intel Corp. under its intellectual property
15+
rights. You may have additional license terms from the party that provided
16+
you this software, covering your right to use that party's intellectual
17+
property rights.
18+
19+
2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
20+
copy of the source code appearing in this file ("Covered Code") an
21+
irrevocable, perpetual, worldwide license under Intel's copyrights in the
22+
base code distributed originally by Intel ("Original Intel Code") to copy,
23+
make derivatives, distribute, use and display any portion of the Covered
24+
Code in any form, with the right to sublicense such rights; and
25+
26+
2.3. Intel grants Licensee a non-exclusive and non-transferable patent
27+
license (with the right to sublicense), under only those claims of Intel
28+
patents that are infringed by the Original Intel Code, to make, use, sell,
29+
offer to sell, and import the Covered Code and derivative works thereof
30+
solely to the minimum extent necessary to exercise the above copyright
31+
license, and in no event shall the patent license extend to any additions
32+
to or modifications of the Original Intel Code. No other license or right
33+
is granted directly or by implication, estoppel or otherwise;
34+
35+
The above copyright and patent license is granted only if the following
36+
conditions are met:
37+
38+
3. Conditions
39+
40+
3.1. Redistribution of Source with Rights to Further Distribute Source.
41+
Redistribution of source code of any substantial portion of the Covered
42+
Code or modification with rights to further distribute source must include
43+
the above Copyright Notice, the above License, this list of Conditions,
44+
and the following Disclaimer and Export Compliance provision. In addition,
45+
Licensee must cause all Covered Code to which Licensee contributes to
46+
contain a file documenting the changes Licensee made to create that Covered
47+
Code and the date of any change. Licensee must include in that file the
48+
documentation of any changes made by any predecessor Licensee. Licensee
49+
must include a prominent statement that the modification is derived,
50+
directly or indirectly, from Original Intel Code.
51+
52+
3.2. Redistribution of Source with no Rights to Further Distribute Source.
53+
Redistribution of source code of any substantial portion of the Covered
54+
Code or modification without rights to further distribute source must
55+
include the following Disclaimer and Export Compliance provision in the
56+
documentation and/or other materials provided with distribution. In
57+
addition, Licensee may not authorize further sublicense of source of any
58+
portion of the Covered Code, and must include terms to the effect that the
59+
license from Licensee to its licensee is limited to the intellectual
60+
property embodied in the software Licensee provides to its licensee, and
61+
not to intellectual property embodied in modifications its licensee may
62+
make.
63+
64+
3.3. Redistribution of Executable. Redistribution in executable form of any
65+
substantial portion of the Covered Code or modification must reproduce the
66+
above Copyright Notice, and the following Disclaimer and Export Compliance
67+
provision in the documentation and/or other materials provided with the
68+
distribution.
69+
70+
3.4. Intel retains all right, title, and interest in and to the Original
71+
Intel Code.
72+
73+
3.5. Neither the name Intel nor any other trademark owned or controlled by
74+
Intel shall be used in advertising or otherwise to promote the sale, use or
75+
other dealings in products derived from or relating to the Covered Code
76+
without prior written authorization from Intel.
77+
78+
4. Disclaimer and Export Compliance
79+
80+
4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
81+
HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
82+
IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
83+
INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
84+
UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
85+
IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
86+
PARTICULAR PURPOSE.
87+
88+
4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
89+
OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
90+
COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
91+
SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
92+
CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
93+
HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
94+
SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
95+
LIMITED REMEDY.
96+
97+
4.3. Licensee shall not export, either directly or indirectly, any of this
98+
software or system incorporating such software without first obtaining any
99+
required license or other approval from the U. S. Department of Commerce or
100+
any other agency or department of the United States Government. In the
101+
event Licensee exports any such software from the United States or
102+
re-exports any such software from a foreign destination, Licensee shall
103+
ensure that the distribution and export/re-export of the software is in
104+
compliance with all laws, regulations, orders, or other restrictions of the
105+
U.S. Export Administration Regulations. Licensee agrees that neither it nor
106+
any of its subsidiaries will export/re-export any technical data, process,
107+
software, or service, directly or indirectly, to any country for which the
108+
United States government or any agency thereof requires an export license,
109+
other governmental approval, or letter of assurance, without first obtaining
110+
such license, approval or letter.
111+
112+
***************************************************************************
113+
114+
Submitting Contributions to ACPICA:
115+
Any contribution (including patches, bug fixes, improvements, or new features)
116+
submitted to the ACPICA project is governed by the “simplified” BSD license
117+
reproduced below. Contributions to ACPICA are accepted under this license in
118+
order to preserve ACPICA’s ability to license ACPICA under all three of the
119+
licenses described above. The way to submit patches and/or bug reports or
120+
fixes is by creating the appropriate ticket (Issue, PR) on our GitHub page.
121+
122+
License for Contributions to ACPICA:
123+
Copyright © 2000 – 2025 Intel Corp.
124+
All rights reserved.
125+
126+
Alternatively, you may choose to be licensed under the terms of the
127+
following license:
128+
129+
Redistribution and use in source and binary forms, with or without
130+
modification, are permitted provided that the following conditions
131+
are met:
132+
1. Redistributions of source code must retain the above copyright
133+
notice, this list of conditions, and the following disclaimer,
134+
without modification.
135+
2. Redistributions in binary form must reproduce at minimum a disclaimer
136+
substantially similar to the "NO WARRANTY" disclaimer below
137+
("Disclaimer") and any redistribution must be conditioned upon
138+
including a substantially similar Disclaimer requirement for further
139+
binary redistribution.
140+
3. Neither the names of the above-listed copyright holders nor the names
141+
of any contributors may be used to endorse or promote products derived
142+
from this software without specific prior written permission.
143+
144+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
145+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
146+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
147+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
148+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
149+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
150+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
151+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
152+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
153+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
154+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
155+
156+
Alternatively, you may choose to be licensed under the terms of the
157+
GNU General Public License ("GPL") version 2 as published by the Free
158+
Software Foundation.
159+
160+
----------------------------------
161+
tests/misc/grammar.asl is under the following license:
162+
163+
Some or all of this work - Copyright (c) 2006 - 2025, Intel Corp.
164+
All rights reserved.
165+
166+
Redistribution and use in source and binary forms, with or without modification,
167+
are permitted provided that the following conditions are met:
168+
169+
Redistributions of source code must retain the above copyright notice,
170+
this list of conditions and the following disclaimer.
171+
Redistributions in binary form must reproduce the above copyright notice,
172+
this list of conditions and the following disclaimer in the documentation
173+
and/or other materials provided with the distribution.
174+
Neither the name of Intel Corporation nor the names of its contributors
175+
may be used to endorse or promote products derived from this software
176+
without specific prior written permission.
177+
178+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
179+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
180+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
181+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
182+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
183+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
184+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
185+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
186+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
187+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)