diff --git a/src/arch/x86_64/asm.rs b/src/arch/x86_64/asm.rs index e06e3a01..0ed57930 100644 --- a/src/arch/x86_64/asm.rs +++ b/src/arch/x86_64/asm.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2020 Google LLC + use core::arch::global_asm; global_asm!(include_str!("ram32.s"), options(att_syntax, raw)); diff --git a/src/arch/x86_64/gdt.rs b/src/arch/x86_64/gdt.rs index 82119954..4846ca02 100644 --- a/src/arch/x86_64/gdt.rs +++ b/src/arch/x86_64/gdt.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2020 Google LLC + use core::mem::size_of; bitflags::bitflags! { diff --git a/src/arch/x86_64/paging.rs b/src/arch/x86_64/paging.rs index d185dfd4..d4789741 100644 --- a/src/arch/x86_64/paging.rs +++ b/src/arch/x86_64/paging.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2020 Google LLC + use x86_64::{ registers::control::Cr3, structures::paging::{PageSize, PageTable, PageTableFlags, PhysFrame, Size2MiB}, diff --git a/src/arch/x86_64/ram32.s b/src/arch/x86_64/ram32.s index c3ea8d67..fa69d094 100644 --- a/src/arch/x86_64/ram32.s +++ b/src/arch/x86_64/ram32.s @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2020 Google LLC + .section .text32, "ax" .global ram32_start .code32 diff --git a/src/arch/x86_64/sse.rs b/src/arch/x86_64/sse.rs index a2d5f12c..5e38d68a 100644 --- a/src/arch/x86_64/sse.rs +++ b/src/arch/x86_64/sse.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2020 Google LLC + use x86_64::registers::control::{Cr0, Cr0Flags, Cr4, Cr4Flags}; // Enable SSE2 for XMM registers (needed for EFI calling) diff --git a/src/block.rs b/src/block.rs index e6ed210c..092e2e1c 100644 --- a/src/block.rs +++ b/src/block.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use core::cell::RefCell; diff --git a/src/bzimage.rs b/src/bzimage.rs index 69897f86..2643399a 100644 --- a/src/bzimage.rs +++ b/src/bzimage.rs @@ -1,16 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. + use atomic_refcell::AtomicRefCell; use crate::{ diff --git a/src/common.rs b/src/common.rs index 6e22f0cd..7ece6304 100644 --- a/src/common.rs +++ b/src/common.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #[macro_export] macro_rules! offset_of { diff --git a/src/efi/alloc.rs b/src/efi/alloc.rs index 6d31a616..810214ce 100644 --- a/src/efi/alloc.rs +++ b/src/efi/alloc.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use r_efi::efi::{self, AllocateType, MemoryType, PhysicalAddress, Status, VirtualAddress}; diff --git a/src/efi/block.rs b/src/efi/block.rs index 52ab56e8..f478ab61 100644 --- a/src/efi/block.rs +++ b/src/efi/block.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use core::ffi::c_void; diff --git a/src/efi/console.rs b/src/efi/console.rs index 985318be..42ec162d 100644 --- a/src/efi/console.rs +++ b/src/efi/console.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use r_efi::{ efi::{Boolean, Char16, Event, Handle, Status}, diff --git a/src/efi/file.rs b/src/efi/file.rs index 96786c2d..ce2b6a42 100644 --- a/src/efi/file.rs +++ b/src/efi/file.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use core::ffi::c_void; diff --git a/src/efi/mod.rs b/src/efi/mod.rs index 10df108d..607f96bf 100644 --- a/src/efi/mod.rs +++ b/src/efi/mod.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use core::{ alloc as heap_alloc, diff --git a/src/fat.rs b/src/fat.rs index 7ac0740c..93d003d7 100644 --- a/src/fat.rs +++ b/src/fat.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use crate::{ block::{Error as BlockError, SectorBuf, SectorRead}, diff --git a/src/integration.rs b/src/integration.rs index 3b4904d1..e282994d 100644 --- a/src/integration.rs +++ b/src/integration.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2020 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // Integration tests live in this file. We can't use the Rust "integration test" mode // as we don't have the expected source code structure. diff --git a/src/loader.rs b/src/loader.rs index b65dcb0f..59c0d342 100644 --- a/src/loader.rs +++ b/src/loader.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use crate::{ block::SectorBuf, diff --git a/src/main.rs b/src/main.rs index 53fb2dc2..ed37984f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #![feature(asm_const)] #![feature(alloc_error_handler)] diff --git a/src/mem.rs b/src/mem.rs index f8cfa1e8..43cc6321 100644 --- a/src/mem.rs +++ b/src/mem.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. #![allow(dead_code)] diff --git a/src/part.rs b/src/part.rs index cbdc98fa..0de06b2f 100644 --- a/src/part.rs +++ b/src/part.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use crate::block::{Error as BlockError, SectorBuf, SectorRead}; diff --git a/src/pci.rs b/src/pci.rs index 4495bf99..eee7bc54 100644 --- a/src/pci.rs +++ b/src/pci.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use atomic_refcell::AtomicRefCell; diff --git a/src/pe.rs b/src/pe.rs index 3bc79f44..55ca2ecf 100644 --- a/src/pe.rs +++ b/src/pe.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. use crate::{block::SectorBuf, mem::MemoryRegion}; diff --git a/src/pvh.rs b/src/pvh.rs index 5cd4fa65..ed7c8ad8 100644 --- a/src/pvh.rs +++ b/src/pvh.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2020 Google LLC + use core::mem::size_of; use crate::{ diff --git a/src/serial.rs b/src/serial.rs index 8cb46cbb..c3fd2ec2 100644 --- a/src/serial.rs +++ b/src/serial.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. // Inspired by https://github.com/phil-opp/blog_os/blob/post-03/src/vga_buffer.rs // from Philipp Oppermann diff --git a/src/virtio.rs b/src/virtio.rs index f7a7fbd1..3c00fd32 100644 --- a/src/virtio.rs +++ b/src/virtio.rs @@ -1,16 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 // Copyright © 2019 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. /// Virtio related errors #[derive(Debug)]