Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4412 commits
Select commit Hold shift + click to select a range
f0e8a74
[hypervisor] Inject GP faults on EPT violation.
abdulla May 15, 2017
3e4bdb6
[guest] Explicitly check for MX_FIFO_READABLE.
abdulla May 15, 2017
55b111b
[magenta][vmo] Document the need for a StateTracker on VMOs
May 16, 2017
8183f6b
[make] Fix an issue with compiler flag "--include <file>"
zeroomega May 16, 2017
0d9a077
[minfs] Make mkfs quieter by default
May 14, 2017
c066780
[fs] Add test for rapidly remounting filesystem repeatedly
May 14, 2017
245326b
[minfs] Fix truncation bugs related to inode sync
May 15, 2017
b0d252c
[fs] Label some persistent tests as large
May 16, 2017
3061edd
[minfs] Convert Minfs's fsck to proper C++
May 14, 2017
c6f8b84
[minfs] Remove unused assignments reported by clang static analyzer
May 16, 2017
28c1c9f
[gfxconsole] Add display ownership change notification
krisgiesing May 9, 2017
53dcd9b
[devmgr] correctly pass service root handle to devhosts
swetland May 15, 2017
ddca75b
[devmgr] devcoord now uses internal devfs implementation
swetland May 15, 2017
ba4aa66
[kernel][arm] Integrate memory limit lib into platform
nvll May 10, 2017
aa1b905
[docs] Add docs for object_{get,set}_property
dbort May 16, 2017
e949f3d
[kernel][pc] Integrate memory limit lib into platform
nvll May 11, 2017
57201ef
[svcfs] Add a non-enumerable svcfs directory
abarth May 16, 2017
09eecaa
Revert "[devmgr] devcoord now uses internal devfs implementation"
swetland May 16, 2017
0a29cc8
[udev][sata] fix wrong interrupt enable bit
May 16, 2017
a3e6560
[kernel][portsv1] fix a bug that could sometimes cause waiters to get…
travisg May 16, 2017
05d59f8
[tests][thread-initial-state] change the XMM test to avoid using ptest
travisg May 16, 2017
c0c8d72
[vmo] Add num_mappings, num_children, is_cow_clone
dbort Apr 21, 2017
8ca1ab6
[gfxconsole] Fix initial state of display ownership flag
krisgiesing May 16, 2017
dc348ce
[kernel][diagnostics] Add 'k mx vmos <pid>' to dump a process's VMOs
dbort Apr 21, 2017
30f3cae
[kernel][x86][topo] detect SMT pairs for modern AMD machines
travisg May 13, 2017
2d7e306
[gfxconsole] Fix type of argument to vc_do_root_open()
May 16, 2017
38df61f
[gfxconsole] Simplify vc_do_root_open()
May 16, 2017
49ba4a2
[kernel][ktrace] fix ktrace probes
travisg May 16, 2017
c641a2c
[make] properly honor QUIET to squelch build spew when using ENABLE_B…
travisg May 11, 2017
037e423
[utest][exception] Fix use of uninitialized var
xdje42 May 12, 2017
04132f2
[mxio] Add mxio_vmo_fd
abarth May 17, 2017
d37e660
[hypervisor] Disable accessed and dirty EPT flags.
abdulla May 16, 2017
8f5a488
[devmgr] devcoord now uses internal devfs implementation
swetland May 15, 2017
8fab8a9
[devmgr] remove devfs bits from shared memfs code
swetland May 16, 2017
12f8dca
[devmgr] don't leak channels on device close
swetland May 17, 2017
d039bef
[kernel] minor code cleanup
flowerhack May 17, 2017
8459460
[vmo] Move cache policy into VmObjectPhysical
nvll Mar 23, 2017
68e977b
[gfxconsole] Fix keyboard input thread to exit when it reads EOF
May 17, 2017
4eee213
Revert "[vmo] Move cache policy into VmObjectPhysical"
nvll May 17, 2017
76187e3
[devmgr] support path walks across the devhost boundary
swetland May 18, 2017
005c72a
[magenta] When suspending, update state first
xdje42 May 18, 2017
18344d9
[devmgr][build] install/load drivers in/from /{boot,system}/driver
swetland May 17, 2017
dda8046
[magenta] cleanup deprected thread/process signal
cpu-chromium May 18, 2017
2539c47
[tests][debugger] fix a hard to reproduce race in the debugger tests
travisg May 15, 2017
682e93d
[kernel][magenta] Mark thread as dead first
xdje42 May 18, 2017
e456c97
[kernel][arm64] Rename some locals in debugger.cpp
xdje42 May 18, 2017
6d1a564
[exceptions][x86] Provide reg access when suspended
xdje42 Apr 30, 2017
2649946
[magenta][exceptions] Handle exception sleep window
xdje42 May 18, 2017
ab79b26
[magenta][exceptions] MX_EXCP_THREAD_SUSPENDING -> _SUSPENDED
xdje42 May 18, 2017
e9c0e80
[devmgr] handle /dev/socket direct open locally
swetland May 18, 2017
cd0a4a7
[audio2] Define the gain control interface.
johngro May 8, 2017
f659fe2
[kernel][deadlines] Remove dynamic checks for API misuse
May 18, 2017
964c54b
[audio2] Refactor audio2 test app.
johngro May 9, 2017
895d8d6
[udev][sata] only write new bits to PxSACT and PxCI registers
May 18, 2017
123f6df
[audio2] Implement info, mute, unmute and gain.
johngro May 9, 2017
8768bf1
[audio2] Define the plug detect interface.
johngro May 11, 2017
0152a6d
[utest][debugger] Refactor wait_inferior_thread_worker
xdje42 May 18, 2017
317bc00
[audio2] Add plug detect support to audio2 test app.
johngro May 12, 2017
836c0d0
[vmofs] Make public methods public
abarth May 17, 2017
43af255
[gfxconsole] Add tests for HID keyboard event processing
May 18, 2017
aac5bab
[merkle] Include node length in digest.
nopsledder May 16, 2017
0668d15
[mx] Add mx::vmo::clone
abarth May 17, 2017
c25f8fa
[gfxconsole] Fix handling of Ctrl with non-letter keys
May 18, 2017
000197a
[kernel][gigaboot][devmgr] reliable last crashlog mechanism
swetland May 19, 2017
144f820
[kernel][capsule] remove rtc capsule mechanism
swetland May 19, 2017
29c1069
[devmgr] use path to driver lib in device_bind()
May 18, 2017
1cbf0ee
[utest][exception] Wait for thread to go to sleep
xdje42 May 17, 2017
fb84784
[kernel][mutex] reimplement mutex as an atomic variable with a fast a…
travisg May 8, 2017
b0338f6
[exceptions][arm64] Rename try_magenta_exception_handler
xdje42 May 1, 2017
d828ac3
[kernel][magenta] last handle signal
cpu-chromium May 10, 2017
464c525
[kernel] fix some issues with platform_*_crashlog()
swetland May 19, 2017
9bc4201
[block] Fix race conditions in Block I/O protocol
May 19, 2017
3634a6e
[ddk] Remove deprecated APIs
May 4, 2017
0af052b
[ddk] install driver tests in /boot/lib/driver/test
May 11, 2017
bfbcf22
[udev][sata] complete iotxns on worker thread
May 18, 2017
1fb8124
[mxcpp][mxalloc] Split mxcpp into mxcpp and mxalloc
May 16, 2017
67783dd
[build][host] Use C++14 for host tools
May 9, 2017
dd83832
[fidl] Make module names mandatory
May 5, 2017
c9993d5
[minfs] Convert indirect nodes to vmo
May 10, 2017
b1e7809
[minfs] Use the FIFO-based Block I/O protocol
May 10, 2017
6026dca
[fidl] Flatten some ast Nodes
May 6, 2017
f21a299
[fidl] Remove trailing semicolons from all Declarations
May 10, 2017
67ee936
[minfs] Force fsck to return an error on bad state
May 14, 2017
b7f870c
[gfxconsole] Keyboard test: Move some of the test code into a class
May 19, 2017
3aa40ce
[minfs] Remove reliance of fsck on bcache
May 15, 2017
1ffd134
[minfs] Significantly simplify block cache
May 15, 2017
1afc1d4
[gn] Fix Fuchsia build
abarth May 19, 2017
db50b39
[fs] Assign default options of mkfs/fsck/mount, rather than copy
May 15, 2017
249f524
[fidl] Correct the specification of using declarations
May 10, 2017
1d47310
[minfs] Convert MinFS, bitmap to use libmx handles
May 15, 2017
048a6c0
[fidl] Tweak an example to not have a name collision
May 11, 2017
8e0bc79
[blobstore] Convert blobs/merkle trees to managed vmos
May 15, 2017
6aea835
[blobstore] Allocate blobs using ftruncate instead of an ioctl
May 16, 2017
e30dc79
[blobstore] Update blob writing semantics
May 17, 2017
4b39119
[fs] Decoupling filesystems from dispatchers
May 18, 2017
c2e00c4
[devmgr] don't crash on CLONE
swetland May 19, 2017
260022c
[system][public] Add BUILD.gn
xdje42 May 19, 2017
757ba73
[hypervisor] Order registers to by number.
abdulla May 19, 2017
18fe721
[process-test] Fix reliability of process tests
nvll May 19, 2017
26715f0
[fifo] Change kMaxSizeBytes to explicitly use PAGE_SIZE.
abdulla May 19, 2017
fb2e1e2
[devmgr] spring cleaning
swetland May 19, 2017
40b78c1
[docs] Correct name of MX_CLONE_COPY_ON_WRITE
abarth May 22, 2017
c0e3233
[qemu][uart] refactor to generic pl011
hollanderic May 17, 2017
f27f9b1
[analyze-magenta] Rewrite analyze-magenta script
zeroomega May 17, 2017
31aef17
[hypervisor] Add bi-directional guest control.
abdulla May 19, 2017
dadde2b
[kernel][arm64] Use better test for "from userspace"
xdje42 May 20, 2017
46b6804
[mxio] support service connection through namespaces
swetland May 18, 2017
3fcf8dd
[magenta][syscalls] Clarify enable/disable ints for syscalls
xdje42 May 20, 2017
64d3e4c
[kernel][arm64] Remove redundant call to thread_process_pending_signals
xdje42 May 20, 2017
3064e7f
[kernel][arm64] swap call_magenta_exception_handler
xdje42 May 19, 2017
149000c
[audio2] Change plug_state_time requirements.
johngro May 19, 2017
f202220
[hypervisor] Get and set guest GPRs.
abdulla May 21, 2017
1aaa0b1
[devmgr] Fix use after free
May 22, 2017
09951a1
[devmgr] Remove a bit of dead code
May 22, 2017
10d5996
[ddk] Update comment for the mx_protocol_device_t open() op
May 22, 2017
6982b37
[docs] Update docs to avoid referring to 'k prevpanic'
dbort May 22, 2017
8959451
[mxio] Let mxio_connect_to work outside /svc
abarth May 22, 2017
6b111aa
[mxio][pipe] Teach pipes to report that they are pipes to stat
May 22, 2017
e946338
[utest][libc] Add tests for fstat() on different file types
jamesr May 22, 2017
7068e0a
Revert "[utest][libc] Add tests for fstat() on different file types"
jamesr May 22, 2017
778ba7a
[hypervisor] Add op to trap on guest physical address.
abdulla May 21, 2017
88f5de5
[gfxconsole] Keyboard handling: Implement Caps Lock
May 22, 2017
7a522d4
[hypervisor] Prevent re-entry after returning from GUEST_ENTER.
abdulla May 22, 2017
b914d31
[vmo] Move cache policy into VmObjectPhysical
nvll Mar 23, 2017
cfc03dd
[kernel][thread exit] move final kernel thread teardown to a DPC
travisg May 22, 2017
91f066f
[devmgr] Add platform bus support
May 19, 2017
8a02119
[udev][bcm] Use platform-bus for RPI3 drivers
May 19, 2017
b05ee7d
[kernel][heap] remove the delayed free queue
travisg May 22, 2017
fb972ad
[pci] Shift to using mx_pci_resource_t for memory
nvll Mar 1, 2017
63f8382
[vmo] Give VmObject a 'user_id' to hold its koid
dbort May 22, 2017
c703950
[hypervisor] Use const-ref when setting GPRs.
abdulla May 23, 2017
b21fd40
[sysgen] Generate syscall category file
frobtech May 11, 2017
e798450
[build] Use input ld script rather than relocatable object for modules
petrhosek May 23, 2017
3b14637
[make] remove trying to use ccache from the environment if CCACHE was…
travisg May 18, 2017
da7fa5d
[ulib][ddk][core][devmgr] Use const magenta_driver_info_t
frobtech May 10, 2017
5e9f020
[build] Support for LTO and ThinLTO in userland
petrhosek May 9, 2017
732bb73
[alloc_checker][kernel][test] Disable OOM alloc checker kernel test
May 23, 2017
2adb4ab
[magenta][diagnostics] Add handle count diagnostics
May 19, 2017
15abe4d
[dash][run-vc] Remote ApplicationEnvironment code
abarth May 23, 2017
a78036e
[kernel][tests] Fix cache test
nvll May 23, 2017
22761c0
[kernel][arm64] Simplify call_magenta_exception_handler
xdje42 May 20, 2017
56fb49f
[build] Remove installation of headers for host tools
xdje42 May 22, 2017
45bf19f
[syscalls] Add a "max height" to job objects
dbort May 16, 2017
398f753
[minfs] Fix host-side MinFS inode sync regression
May 20, 2017
1c69914
[arm64][exceptions] Mask SErrors from uspace
hollanderic May 23, 2017
8c4c373
[procargs] Remove deprecated startup handle names
abarth May 23, 2017
870afa5
[kernel][syscalls] Enforce vDSO use for system calls
frobtech May 23, 2017
c7cdfd0
[magenta] Unify dispatcher naming
Feb 18, 2017
66dd649
[kernel][object info] add MX_INFO_THREAD_STATS info topic
travisg May 18, 2017
cabbc23
[kernel][tga] remove the unused lib/tga library
travisg May 23, 2017
20838e6
[system][top] Add the first stab at a top utility
travisg May 23, 2017
16d83c4
[ulib][mxio] Make mxio_get_vmo return whole VMO when it's nothing but…
frobtech May 23, 2017
97439fe
[kernel][x86] Add cpu info to trace output
xdje42 May 23, 2017
3616468
[udev] move built-in root, null and zero drivers into same directory
May 23, 2017
c548f65
[vmo] Add a name to VmObject, though no-one sets it yet
dbort May 22, 2017
7584089
[build] Avoid bash-4 features in scripts/gen-vdso-valid-sysret.sh
frobtech May 23, 2017
6e5faa3
[kernel][arm64] Use movlit macro in place of literal pool for integer…
frobtech May 23, 2017
eb3f615
[vmo] object_get/set_property can get/set VMO names
dbort May 22, 2017
bb07736
[kernel][arm64] Add adr_global macro, use it
frobtech May 23, 2017
c4e9e80
[kernel][arm64] Add movabs macro, use it instead of literal pools
frobtech May 23, 2017
744c2cf
[mxtl][name] Parameterize the size of mxtl::Name
May 23, 2017
3d49f05
[hypervisor] Remove SP from mx_guest_gpr_t.
abdulla May 23, 2017
d362573
[tools][netcp] Print to stdout if dst is '-'
nvll May 23, 2017
04bef5d
[thread] Add "bt#(\d+): end" to backtraces
nvll May 23, 2017
3a2f86c
[devmgr] Manage life cycle for device instances
May 23, 2017
867bd1a
[symbolize] Improve magenta handling
nvll May 23, 2017
9cd2281
[mdi] Use virt addresses in mdi
hollanderic May 23, 2017
66c438f
[kernel][vmo] Give VMO clones property rights
frobtech May 24, 2017
43616ba
[mxtl][arena] Make the arena peaceful, no more execution!
May 24, 2017
5e5ef50
[ulib][runtime] Remove unneeded sysinfo runtime functions
May 24, 2017
09b8f1b
[root] Add .vscode to .gitignore
abarth May 23, 2017
2d20357
[bootloader] add missing "pragma once" to framebuffer header file
tfarina May 23, 2017
a2c3e6d
[uart][pl011] enable timeout irq for rx
hollanderic May 24, 2017
a33a52b
[musl] Remove empty and nonstandard syscall.h files
May 24, 2017
f3fae54
[scripts] Make magenta.elf-gdb.py Python3-compatible
dato May 20, 2017
4ded54e
[arm64][hikey960] Support for HiKey960
hollanderic May 24, 2017
20f96df
[docs][hikey] Getting started docs for hikey
hollanderic May 24, 2017
5df84da
Revert "[musl] Remove empty and nonstandard syscall.h files"
May 24, 2017
5855e67
[scripts][run-magenta] using the -V switch should override the defaul…
travisg May 23, 2017
d20e923
[hypervisor] Allow user-space to provide APIC memory.
abdulla May 24, 2017
6568c36
[arm] Support passing cmdline via bootdata
gkalsi May 23, 2017
7e575eb
[devmgr] Fix crash in devhost_device_rebind()
May 24, 2017
48e0d2e
Fix spelling of mxio_watcher_destroy() in watcher.h
sgraham May 24, 2017
39c3ac1
[bootserver] Help text now shows 500 microsecond wait time
jimbeveridge May 24, 2017
ba4957a
[framebuffer] dumb framebuffer common core driver
swetland May 19, 2017
4183bbe
[devmgr] Rename Memfs constant 'kMemfs...' rather than 'kMinfs...'
May 24, 2017
a3e0da5
[utest][resource] fix test failure due to new last handle signal
swetland May 25, 2017
cead3de
[hypervisor] Move APIC and EPT handling to user-space.
abdulla May 22, 2017
9272bfc
[system][coretests] Fix core test signals
cpu-chromium May 25, 2017
e117a90
[sdmmc] Add BLOCK_CORE support to sdmmc driver
May 23, 2017
354232b
[udev][usb-xhci] Fix hang when attempting to transfer maximum transfe…
May 24, 2017
fdfb554
[test] Fix double close of handle in cleanup test
May 25, 2017
eba99be
[runtime] Remove mxr_once(), since it is unused
May 25, 2017
76a4371
[utest] Cleanup: Make condvar test pass if run multiple times
May 25, 2017
7de69a1
[ulib][unittest] Print the list of failing test cases
dbort May 16, 2017
c669832
[hypervisor] Remove ApicRegister enum.
abdulla May 25, 2017
d9da395
Add --file and --echo options to symbolize
May 25, 2017
821e868
[minfs] Update fsck to check link counts
planders May 20, 2017
363dcc2
[vmo][diagnostics] Dump more info in 'k mx vmos'
dbort May 22, 2017
113910a
[hypervisor] Add support for movz to ulib.
abdulla May 25, 2017
8adaadf
[cmdline][kernel] Implement appending to kernel cmdline
gkalsi May 24, 2017
867fb48
[tools][bootfs] Add cmdline section to mkbootfs tool
gkalsi May 24, 2017
2854456
[guest] Add basic TPM support.
abdulla May 25, 2017
c334993
[kernel][x86] Be more explicit about page table accesses
May 22, 2017
40fd39b
[kernel][hihey960] get rid of an extraneous include of mdi.mk
travisg May 25, 2017
426bddf
[arm64][mmu] Mark PT accesses as volatile
May 25, 2017
75c1404
[gfxconsole] archive the existing gfxconsole as gfxconsole-classic
swetland May 24, 2017
5236773
[kernel][arm64] bump the arm64 kernel stack size to 8k to match x86-64
travisg May 25, 2017
8da1565
[gfxconsole] migrate from driver to service (1 of n)
swetland May 24, 2017
d4ae843
[mexec] Fix hard-coded branch address
gkalsi May 20, 2017
05e6e5d
[magenta] Prevent opening directories as writable
May 25, 2017
296a83c
[kernel][app] Remove unused pcitests.
abdulla May 25, 2017
80791af
[unittest] Move RUN_NAMED_TEST_TYPE code from a macro to a function
May 25, 2017
40839f2
[gfxconsole] migrate from driver to service (2 of n)
swetland May 24, 2017
34ec388
[mxio] Fix typo in header
May 25, 2017
cf4018b
[gfxconsole] migrate from driver to service (3 of n)
swetland May 24, 2017
cf27ce6
[fs] Remove problematic constexpr
May 25, 2017
df875e7
[sysgen][kernel] Refactor x86 syscall dispatch.
would-code-again May 16, 2017
474758b
[udev][usb-mass-storage] Break large transfers into multiple UMS tran…
May 25, 2017
70f74ea
[kernel] Fix builds broken by sysgen changes.
would-code-again May 26, 2017
74276d9
[devmgr] provide services to all child processes
swetland May 25, 2017
01142f6
[sysgen][syscalls] Clangfmt and cleanup sysgen.
would-code-again May 26, 2017
2b0c764
[system][ulib] make mini-process do more things
cpu-chromium May 19, 2017
063b76c
[kernel][ktrace] move the timestamp getting to the point where its st…
travisg May 26, 2017
81a0789
[syscalls][socket] use mbuf-style backing memory
crawshaw May 22, 2017
740c0b3
[travis-ci] add magenta-hikey960-arm64 to the build list
travisg May 25, 2017
fffecce
[kernel][magenta] Cancelation should consider port
cpu-chromium May 26, 2017
395eb6f
[syscalls][socket] always use user_ptr for data
crawshaw May 26, 2017
3ab583d
[docs] update QEMU doc to include how to enable emulated disk
May 26, 2017
0104286
[minfs] Ensure that bcache is deleted when unmounting
May 24, 2017
fc6e562
[exceptions][arm64] Provide reg access when suspended
xdje42 May 1, 2017
02359f5
[minfs] Convert bcache to unique_ptr
May 25, 2017
181b89d
[fs] Fix leaks in RW workers test
May 25, 2017
7a9f48a
[docs] Document buildall and tests
nvll May 26, 2017
7194439
[acpica] Use ACPI_INVALID_TABLE_INDEX instead of UINT32_MAX.
abdulla May 26, 2017
392ad40
[kernel][vmo] Add VmObject::share_count()
dbort May 25, 2017
5df485d
[kernel][aspace] VmAspace::GetMemoryUsage tracks private/shared
dbort May 25, 2017
f1c73b6
[mxio] Prevent malicious RIO clients from exploiting msg->hcount
May 26, 2017
2fc5247
[syscalls] Add private/shared memory fields to mx_info_task_stats
dbort May 25, 2017
f114be3
[uapp][ps] Show PSS/PRIVATE/SHARED in ps
dbort May 26, 2017
3d9a969
[kernel][heap] general heap wrapper improvements
travisg May 26, 2017
88de735
[scripts][flash-hikey] bail if the required tools aren't working
travisg May 26, 2017
4756d03
[kernel][clock_tests] add code to run the cpu cycle counter per cpu
travisg May 26, 2017
62a9b77
[docs] Clarify buffer writing semantics
May 26, 2017
8c15a53
[mxtl] Add count_of constexpr function
tkilbourn May 26, 2017
4d682ae
[kernel][vdso][userboot][devmgr] Machinery for variant vDSOs
frobtech May 27, 2017
7095369
[kernel][syscalls] move the expensive part of the vdso_code_address g…
travisg May 26, 2017
29760fa
[ddk] Remove mx_driver_t from all DDK APIs
swetland May 24, 2017
7f5c2b5
[udev][usb-bt-hci] Fix crash in hci_release
armansito May 27, 2017
4a16a6d
[libmx] Add support for managed fifos
May 28, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
build-*/
*.swp
*.swo
*~
tags
TAGS
Expand All @@ -13,12 +14,17 @@ blk.bin
*.dSYM
scripts/toolpaths.local
clang-format
compile_commands.json
.vscode
*_BACKUP_*
*_REMOTE_*
*_LOCAL_*
*_BASE_*
*.sublime-*
/benchmarks/
/infra/.recipe_deps
/out*
/prebuilt/downloads/*
/prebuilt/downloads/
/prebuilt/config.mk
/prebuilt/config.mk.bak
/AnalysisResult/
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: c
script: ./scripts/travis-builds.sh
env:
# full magenta kernel + user space builds
- PROJECT=magenta-pc-x86-64
- PROJECT=magenta-qemu-arm64
- PROJECT=magenta-rpi3-arm64
- PROJECT=magenta-hikey960-arm64

# kernel only, no-magenta builds
- PROJECT=pc-x86-64-test
- PROJECT=qemu-virt-a53-test

sudo: required
dist: trusty

cache:
directories:
- prebuilt/downloads
- prebuilt/configs

notifications:
irc:
channels:
- "chat.freenode.net#fuchsia-bot"
skip_join: true
use_notice: true
21 changes: 14 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
The Magenta Kernel (kernel/...) is under the MIT License, a copy of which
may be found in kernel/LICENSE
The Magenta Kernel (kernel/...) and the Magenta Scripts (scripts/...)
are under an MIT-style license, copies of which may be found in
kernel/LICENSE and scripts/LICENSE.

The Magenta System (system/...) is under the Apache 2 License, a copy of
which may be found in system/LICENSE
The Third Party Components (third_party/...) are under various
licenses (of the BSD, MIT, or Zlib style), which may be found in the
root directory of each component, respectively.

The Third Party Components (third_party/...) are under various licenses
(of the BSD, MIT, or Zlib style), which may be found in the root directory
of each component, respectively.
All other components and materials, including the Magenta System
(system/...) and Bootloader (bootloader/...), are under a BSD-style
license, copies of which may be found in system/LICENSE and
bootloader/LICENSE.

The PATENTS file, which may be found in the same directories as the
LICENSE files, provides additional license rights and conditions
relating to patents.
22 changes: 22 additions & 0 deletions PATENTS
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Additional IP Rights Grant (Patents)

"This implementation" means the copyrightable works distributed by
Google as part of the Fuchsia project.

Google hereby grants to you a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this
section) patent license to make, have made, use, offer to sell, sell,
import, transfer, and otherwise run, modify and propagate the contents
of this implementation of Fuchsia, where such license applies only to
those patent claims, both currently owned by Google and acquired in
the future, licensable by Google that are necessarily infringed by
this implementation. This grant does not include claims that would be
infringed only as a consequence of further modification of this
implementation. If you or your agent or exclusive licensee institute
or order or agree to the institution of patent litigation or any other
patent enforcement activity against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that this
implementation of Fuchsia constitutes direct or contributory patent
infringement, or inducement of patent infringement, then any patent
rights granted to you under this License for this implementation of
Fuchsia shall terminate as of the date such litigation is filed.
42 changes: 37 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
# MAGENTA REPOSITORY
# Magenta

Welcome to the Magenta repository.
Magenta is the core platform that powers the Fuchsia OS. Magenta is
composed of a microkernel (source in kernel/...) as well as a small
set of userspace services, drivers, and libraries (source in system/...)
necessary for the system to boot, talk to hardware, load userspace
processes and run them, etc. Fuchsia builds a much larger OS on top
of this foundation.

The documentation is divided into
The canonical Magenta Git repository is located
at: https://fuchsia.googlesource.com/magenta

+ [Magenta](docs/index.md) specific.
+ [LK](docs/lk/index.md) specific.
A read-only mirror of the code is present
at: https://github.com/fuchsia-mirror/magenta

The Magenta Kernel provides syscalls to manage processes, threads,
virtual memory, inter-process communication, waiting on object state
changes, and locking (via futexes).

Currently there are some temporary syscalls that have been used for early
bringup work, which will be going away in the future as the long term
syscall API/ABI surface is finalized. The expectation is that there will
be 10s, not 100s of syscalls.

Magenta syscalls are generally non-blocking. The wait (one, many, set)
family of syscalls, ioport reads, and thread sleep being the notable
exceptions.

This page is a non-comprehensive index of the magenta documentation.

+ [Getting Started](docs/getting_started.md)
+ [Contributing Patches](docs/contributing.md)
+ [Testing](docs/testing.md)
+ [Hacking notes](docs/hacking.md)
+ [Relationship with LK](docs/mg_and_lk.md)
+ [Kernel Objects](docs/kernel_objects.md)
+ [Process Objects](docs/objects/process.md)
+ [Thread Objects](docs/objects/thread.md)
+ [Handles](docs/handles.md)
+ [System Calls](docs/syscalls.md)
27 changes: 27 additions & 0 deletions bootloader/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright 2017 The Fuchsia Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 changes: 42 additions & 0 deletions bootloader/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Intel Visual BIOS (on NUC) and netboot
--------------------------------------
This will netboot EFI apps, provided you have a DHCP server which is
setup to give the BIOS the IP of a tftp server and a filename to grab
from there.

You must disable legacy boot for the EFI netboot option to appear. If
you check the "keep retrying forever" option, when your app exits, the
BIOS will try to download it from the tftp server again, making for a
quick build/download/test cycle


Making tftpd work on Ubuntu with IPv4
-------------------------------------
sudo apt-get install tftpd-hpa

Optionally make it easy to copy files to the server without sudo:
sudo chown `who` /var/lib/tftpdboot

Edit /etc/default/tftpd-hpa so it looks more like:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure -4 -v -v -v"

Removing the [::] and adding the -4 make it work reliably on IPv4 for me.
The several -v's make it chattier in syslog which is handy if you're not
sure the test machine is actually trying to grab files.

QEMU Tips
-------------------------------------
USB-ETH Adapters:
- For ASIX chipset usb adapters if you have permission issues copy the udev rules in scripts/ to /etc/udev/rules.d/

E1000 local networking bridge:
- You can create a network interface using the Linux tun/tap network device named “qemu” for the
qemu-e1000 target. Qemu does not need to be run with any special privileges for this, but you need
to create a persistent tun/tap device ahead of time (which does require you be root):

sudo apt-get install uml-utilities
sudo tunctl -u $USER -t qemu
sudo ifconfig qemu up
35 changes: 35 additions & 0 deletions bootloader/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
What is This?
-------------

This project contains some experiments in software that runs on UEFI
firmware for the purpose of exploring UEFI development and bootloader
development.

Since UEFI images are in PE32+ file format, we require that our binaries be
position independent executables with no relocations. For the most part this
does not require any extra effort on x86-64, but it does mean that you cannot
statically initialize any variables that hold an address. (These addresses may
be assigned at runtime however.)


External Dependencies
---------------------

qemu-system-x86_64 is needed to test in emulation
gnu parted and mtools are needed to generate the disk.img for Qemu


Useful Resources & Documentation
--------------------------------

ACPI & UEFI Specifications
http://www.uefi.org/specifications

Intel 64 and IA-32 Architecture Manuals
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

Tianocore UEFI Open Source Community
(Source for OVMF, EDK II Dev Environment, etc)
http://www.tianocore.org/
https://github.com/tianocore

108 changes: 108 additions & 0 deletions bootloader/build.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Copyright 2016 The Fuchsia Authors
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT

LOCAL_DIR := $(GET_LOCAL_DIR)

ifeq ($(call TOBOOL,$(USE_CLANG)),true)
EFI_CC := $(CLANG_TOOLCHAIN_PREFIX)clang
EFI_LD := $(CLANG_TOOLCHAIN_PREFIX)lld-link
else
EFI_CC := $(TOOLCHAIN_PREFIX)gcc
EFI_LD := $(TOOLCHAIN_PREFIX)ld
endif

EFI_CFLAGS := -fshort-wchar -fno-stack-protector -mno-red-zone
EFI_CFLAGS += -Wall -std=c99
EFI_CFLAGS += -ffreestanding -nostdinc -I$(LOCAL_DIR)/include -I$(LOCAL_DIR)/src
EFI_CFLAGS += -Isystem/public -Isystem/private
ifeq ($(call TOBOOL,$(USE_CLANG)),true)
EFI_CFLAGS += --target=x86_64-windows-msvc
else
EFI_CFLAGS += -fPIE
endif

ifeq ($(call TOBOOL,$(USE_CLANG)),true)
EFI_LDFLAGS := /subsystem:efi_application /entry:efi_main /libpath:out
else
EFI_LINKSCRIPT := $(LOCAL_DIR)/build/efi-x86-64.lds
EFI_LDFLAGS := -nostdlib -T $(EFI_LINKSCRIPT) -pie -Lout
endif

EFI_SECTIONS := .text .data .reloc
EFI_SECTIONS := $(patsubst %,-j %,$(EFI_SECTIONS))

EFI_SO := $(BUILDDIR)/bootloader/bootx64.so
EFI_BOOTLOADER := $(BUILDDIR)/bootloader/bootx64.efi

# Bootloader sources
EFI_SOURCES := \
$(LOCAL_DIR)/src/osboot.c \
$(LOCAL_DIR)/src/cmdline.c \
$(LOCAL_DIR)/src/magenta.c \
$(LOCAL_DIR)/src/legacy.c \
$(LOCAL_DIR)/src/misc.c \
$(LOCAL_DIR)/src/netboot.c \
$(LOCAL_DIR)/src/netifc.c \
$(LOCAL_DIR)/src/inet6.c \
$(LOCAL_DIR)/src/pci.c \
$(LOCAL_DIR)/src/framebuffer.c \
$(LOCAL_DIR)/src/device_id.c \

# libxefi sources
EFI_SOURCES += \
$(LOCAL_DIR)/lib/efi/guids.c \
$(LOCAL_DIR)/lib/xefi.c \
$(LOCAL_DIR)/lib/loadfile.c \
$(LOCAL_DIR)/lib/console-printf.c \
$(LOCAL_DIR)/lib/ctype.c \
$(LOCAL_DIR)/lib/printf.c \
$(LOCAL_DIR)/lib/stdlib.c \
$(LOCAL_DIR)/lib/string.c \

EFI_OBJS := $(patsubst $(LOCAL_DIR)/%.c,$(BUILDDIR)/bootloader/%.o,$(EFI_SOURCES))
EFI_DEPS := $(patsubst %.o,%.d,$(EFI_OBJS))

$(BUILDDIR)/bootloader/%.o : $(LOCAL_DIR)/%.c
@$(MKDIR)
$(call BUILDECHO,compiling $@)
$(NOECHO)$(EFI_CC) -MMD -MP -o $@ -c $(EFI_CFLAGS) $<

ifeq ($(call TOBOOL,$(USE_CLANG)),true)

$(EFI_BOOTLOADER): $(EFI_OBJS)
@$(MKDIR)
$(call BUILDECHO,linking $@)
$(NOECHO)$(EFI_LD) /out:$@ $(EFI_LDFLAGS) $^

else

$(EFI_SO): $(EFI_OBJS)
@$(MKDIR)
$(call BUILDECHO,linking $@)
$(NOECHO)$(EFI_LD) -o $@ $(EFI_LDFLAGS) $^
$(NOECHO)if ! $(READELF) -r $@ | grep -q 'no relocations'; then \
echo "error: $@ has relocations"; \
$(READELF) -r $@; \
rm $@; \
exit 1;\
fi

# TODO: update this to build other ARCHes
$(EFI_BOOTLOADER): $(EFI_SO)
@$(MKDIR)
$(call BUILDECHO,building $@)
$(NOECHO)$(OBJCOPY) --target=pei-x86-64 --subsystem 10 $(EFI_SECTIONS) $< $@
$(NOECHO)if [ "`$(NM) $< | grep ' U '`" != "" ]; then echo "error: $<: undefined symbols"; $(NM) $< | grep ' U '; rm $<; exit 1; fi

endif

GENERATED += $(EFI_BOOTLOADER)
EXTRA_BUILDDEPS += $(EFI_BOOTLOADER)

.PHONY: gigaboot
gigaboot: $(EFI_BOOTLOADER)

-include $(EFI_DEPS)
Loading