Commit graph

142 commits

Author SHA1 Message Date
Adrian Danis
933bd8b00a x86: add kpptr_to_paddr
This commit introduces the idea of a 'kpptr', which is simply an
address that is a kernel symbol. This allows for, in the future, to
have two different translations (between pointers and physical addresses)
one for kernel symbols, and one for other memory
2016-01-12 10:04:31 +11:00
Adrian Danis
e13c41fa57 x86: Use an unsigned value for IO domain state
Verification prefers not to deal with signed numbers, and there is
no reason for these to be signed
2016-01-12 10:04:31 +11:00
Adrian Danis
2be92b88ac Merge pull request #61 in SEL4/sel4 from ~ADANIS/sel4:x86_ver to master
* commit 'e74123c37b51ada05be30749edf9ad96fa6b3ab0':
  x86: Remove underscores from symbols as they are in violation of the C standard
  x86: Move cpus to boot_state to avoid taking address of a local variable
  x86: Do not use string literals as they violate the CParser
  x86: Fix compile assert
  x86: Correct loop for verification
  x86: Add user_data_t. Needed for verification
2016-01-11 04:51:36 +00:00
Adrian Danis
e74123c37b x86: Remove underscores from symbols as they are in violation of the C standard 2016-01-11 15:29:26 +11:00
Adrian Danis
650a0f10bc x86: Add user_data_t. Needed for verification 2016-01-11 15:29:26 +11:00
Adrian Danis
8238b391c0 Merge pull request #24 in SEL4/sel4 from ~MFERNANDEZ/sel4:4bfffad6-8c14-469d-8790-ea2e8d556805 to master
* commit '4bafc8b54728440b305961fdb0a914cb513b5661':
  Remove now-unused CLZL macro.
  Remove CLZ indirection via the CLZL macro.
  Remove `boot_clzl`.
  Fix missing include.
2016-01-11 04:16:12 +00:00
Adrian Danis
f4cb2f6e9f Merge pull request #33 in SEL4/sel4 from ~MFERNANDEZ/sel4:737990ae-9ee8-4acd-8720-26da70a7602d to master
* commit '878874fb2115da90eca754050ec01ba018a2fc07':
  x86: Use PHYS_CODE abstraction instead of explicit section names.
2016-01-11 03:29:04 +00:00
Adrian Danis
54fdda0bea Merge pull request #32 in SEL4/sel4 from ~MFERNANDEZ/sel4:2aadcc6c-5d97-4cab-82eb-d35f8d62b9eb to master
* commit '0cb33dec6df40b0e4d4c1e6f2fa646017b26f40f':
  Add a configuration option to disable ANSI colours.
2016-01-11 03:28:50 +00:00
Anna Lyons
e619975c0e SELFOUR-114: make IPC buffer definition accessible to the kernel 2016-01-11 11:16:24 +11:00
Anna Lyons
d93699c9a3 SELFOUR-114: remove duplication of seL4_MessageInfo_t, adjust naming to avoid cparser mangling 2016-01-11 11:16:08 +11:00
Adrian Danis
44a522dce2 libsel4: Generate libsel4 definitions from the current ARCH as well as the SEL4_ARCH 2016-01-08 10:16:30 +11:00
Anna Lyons
7758899844 SELFOUR-244: symlink duplicated files from libsel4 into kernel rather than duplicating them, remove sanity target as a result 2016-01-05 08:33:39 +11:00
Adrian Danis
75153a08ac x86: Do not use A constraint in inline assembly as it does not work correctly between 32 and 64 bit code 2015-12-23 15:30:30 +11:00
Adrian Danis
371a891dc4 x86: Move getFaultAddr to general hardware.h, as the read_cr2 is already specialized by the machine mode 2015-12-23 11:57:09 +11:00
Adrian Danis
c6139ce4af x86: Rename ia32KScurInterrupt -> x86KScurInterrupt 2015-12-22 14:37:52 +11:00
Adrian Danis
59d820a0cc x86: Use standard calling convention instead of fastcall
There is no measureable benefit from using the fastcall calling convention
and in all but one usage location the compiler should be inlining all the
functions calls, making the calling convention completely irrelevant
2015-12-22 13:43:27 +11:00
Adrian Danis
d827cf33d1 trivial: style 2015-12-22 13:23:11 +11:00
Adrian Danis
74f620d147 x86: Rename FaultEIP and NextEIP to FaultIP and NextIP to allow for 32/64-bit independent code 2015-12-21 15:14:33 +11:00
Adrian Danis
9227ee88b8 x86: Move 32-bit specific initial address space creation to vspace_32 2015-12-21 10:34:40 +11:00
Adrian Danis
4e81ed05b0 x86: Extract 32-bit specific vspace functions in mode/vspace.c 2015-12-21 10:34:37 +11:00
Adrian Danis
19620c9395 x86: Create 32-bit specific statedata 2015-12-18 15:41:11 +11:00
Adrian Danis
8e15c42921 x86: Port some of the IOMMU changes on the experimental branch
This changes the IOMMU from using passthrough devices and instead
directly mapping in the reserved regions that are needed for each
device.
2015-12-18 15:06:39 +11:00
Matthew Fernandez
878874fb21 x86: Use PHYS_CODE abstraction instead of explicit section names. 2015-12-18 13:58:42 +11:00
Matthew Fernandez
0cb33dec6d Add a configuration option to disable ANSI colours.
Note that the default is for ANSI colours to be enabled, so behaviour will be
unchanged for projects that update to this commit and make no build
configuration changes.
2015-12-18 12:22:19 +11:00
Adrian Danis
b03c6dbf7d x86: With multi-kernel support removed make the kernel PDs etc global instead of passing them around 2015-12-18 10:50:08 +11:00
Adrian Danis
646638efee x86: Do not conditionally compile IOMMU code, use build/run time checks
Guarding code with #ifdef's makes even cursor testing of 'does this code compile'
difficult due to code being hidden by the pre-processor. Using config_set in
regular C if statements is performant as the compiler can trivially detect
dead code at compile time, and at -O1 and above will not even link in symbols
referenced by dead code in these blocks, so this will not bloat image size
2015-12-17 14:37:08 +11:00
Adrian Danis
5d42d0143e x86: Do not conditionally compile IRQ controller code, use build/run time checks
Guarding code with #ifdef's makes even cursor testing of 'does this code compile'
difficult due to code being hidden by the pre-processor. Using config_set in
regular C if statements is performant as the compiler can trivially detect
dead code at compile time, and at -O1 and above will not even link in symbols
referenced by dead code in these blocks, so this will not bloat image size
2015-12-17 14:37:08 +11:00
Adrian Danis
791db5edb9 Merge pull request #25 in SEL4/sel4 from ~ADANIS/sel4:pae to master
* commit '4413fd1be516baeac30f77da8b23c3a9fef0ec07':
  x86: Make some vspace code and definitions non-static that get used by the PAE vspace code
  libsel4: Define different lookup levels for PAE
2015-12-17 03:29:54 +00:00
Adrian Danis
4413fd1be5 x86: Make some vspace code and definitions non-static that get used by the PAE vspace code 2015-12-17 14:03:00 +11:00
Matthew Fernandez
4bafc8b547 Remove now-unused CLZL macro. 2015-12-17 13:49:10 +11:00
Adrian Danis
71a45e6b44 x86: Strip multi kernel support from the x86 kernel. This is not used and is conflicting with planned future features 2015-12-17 11:56:47 +11:00
Adrian Danis
1c53c3336c ia32: Add includes that are now needed after other includes got reordered 2015-12-17 10:58:55 +11:00
Adrian Danis
d9ff68e40a Merge pull request #14 in SEL4/sel4 from ~ADANIS/sel4:x86_common to master
* commit 'fc27f47f0cbaa72734f820160db768cbaac3a898':
  x86: Move general x86 functions to common header
  x86: Rename constants and functions to have X86 prefix instead of IA32 prefix
  x86: Make parts of what have become 32-bit specific headers common
2015-12-16 23:50:31 +00:00
Adrian Danis
1b34ed08c8 x86: Define a KERNEL_BASE_OFFSET for translating the kernel image region
This definition is different to BASE_OFFSET in that it is only meant to
apply to the kernel image portion of the kernel window, and doesn't
assume that the entire window can be translated by a single offset
2015-12-15 17:16:43 +11:00
Adrian Danis
fc27f47f0c x86: Move general x86 functions to common header 2015-12-15 17:08:28 +11:00
Adrian Danis
ef85f94a99 x86: Rename constants and functions to have X86 prefix instead of IA32 prefix 2015-12-15 17:08:28 +11:00
Adrian Danis
6729ce7823 x86: Make parts of what have become 32-bit specific headers common
The reason these were not made common to begin with is so that there
was a commit that was just a rename of these files to make any merges
with other branches that might exist easier
2015-12-15 17:08:28 +11:00
Adrian Danis
4056ad404f Merge pull request #11 in SEL4/sel4 from ~ADANIS/sel4:apic_init to master
* commit '64aed5370af89e1e1ba751941582125adfca971c':
  x86: Move APIC frequency calculation to APIC init, instead of doing it before we initialize paging
2015-12-15 03:42:00 +00:00
Anna Lyons
a0e5db7a2a Add debug functionality to print the kernel entry reason and arguments at any point in the kernel 2015-12-15 12:01:18 +11:00
Adrian Danis
64aed5370a x86: Move APIC frequency calculation to APIC init, instead of doing it before we initialize paging 2015-12-14 19:13:20 +11:00
Adrian Danis
022287c38b x86: Minimal changes to fix previous commit that renamed headers 2015-12-14 12:55:46 +11:00
Adrian Danis
c597c72fdf Move files that contain 32-bit specific code into specific 'mode'
directories

This commit is 'broken' as it leaves the repository in an unbuildable state.
The purpose of having this commit is so that there is a commit where the
modifications to these files is *just* a rename, making it easier to merge
these changes into other branches.
2015-12-14 12:48:12 +11:00
Adrian Danis
fbb4affde7 x86: Make parts of what is currently the 32-bit specific structures common 2015-12-14 12:48:12 +11:00
Adrian Danis
78e2457e91 Minimal modifications to structures file to make repository build again 2015-12-14 12:48:12 +11:00
Adrian Danis
bd7f06d2dc Move structures.bf files that contain 32-bit specific code into specific
mode directories

This commit is 'broken' as it leaves the repository in an unbuildable state.
The purpose of having this commit is so that there is a commit where the
modifications to these files is *just* a rename, making it easier to merge
these changes into other branches.
2015-12-14 12:48:12 +11:00
Adrian Danis
994c22dd13 trivial: style 2015-12-10 16:09:39 +11:00
Joel Beeren
84fb0dcdfe conversion: fixed hardcoded spec rule for clzl 2015-12-10 10:45:23 +11:00
Joel Beeren
a0c228c953 conversion: fix stray unsigned int size 2015-12-10 10:45:23 +11:00
Joel Beeren
8b62754402 conversion: standardised type of 'length' for arm 2015-12-10 10:45:22 +11:00
Joel Beeren
912089fac5 conversion: fixed unnecessary word_t change 2015-12-10 10:45:22 +11:00