diff options
Diffstat (limited to 'core')
80 files changed, 311 insertions, 1093 deletions
diff --git a/core/affinity.c b/core/affinity.c index 070a1cd..d2bf030 100644 --- a/core/affinity.c +++ b/core/affinity.c @@ -1,18 +1,5 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. - */ +// SPDX-License-Identifier: Apache-2.0 +/* Copyright 2013-2019 IBM Corp. */ /* * diff --git a/core/bitmap.c b/core/bitmap.c index be0700f..0900a61 100644 --- a/core/bitmap.c +++ b/core/bitmap.c @@ -1,18 +1,6 @@ -/* Copyright 2016 IBM Corp. - * - * 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. - */ +// SPDX-License-Identifier: Apache-2.0 +/* Copyright 2016 IBM Corp. */ + #include "bitmap.h" static int __bitmap_find_bit(bitmap_t map, unsigned int start, unsigned int count, diff --git a/core/buddy.c b/core/buddy.c index b98a229..d3f7ee3 100644 --- a/core/buddy.c +++ b/core/buddy.c @@ -1,18 +1,6 @@ -/* Copyright 2016 IBM Corp. - * - * 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. - */ +// SPDX-License-Identifier: Apache-2.0 +/* Copyright 2016-2017 IBM Corp. */ + #include <assert.h> #include <stdlib.h> #include <string.h> diff --git a/core/chip.c b/core/chip.c index 221cf2d..4a4a9a2 100644 --- a/core/chip.c +++ b/core/chip.c @@ -1,19 +1,5 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. - */ - +// SPDX-License-Identifier: Apache-2.0 +/* Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> #include <chip.h> diff --git a/core/console-log.c b/core/console-log.c index dd23027..09176af 100644 --- a/core/console-log.c +++ b/core/console-log.c @@ -1,24 +1,11 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. - */ - +// SPDX-License-Identifier: Apache-2.0 /* * Console Log routines * Wraps libc and console lower level functions * does fancy-schmancy things like timestamps and priorities * Doesn't make waffles. + * + * Copyright 2013-2018 IBM Corp. */ #include "skiboot.h" diff --git a/core/console.c b/core/console.c index 0e9bc45..139ba4a 100644 --- a/core/console.c +++ b/core/console.c @@ -1,24 +1,12 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. - */ - +// SPDX-License-Identifier: Apache-2.0 /* * Console IO routine for use by libc * * fd is the classic posix 0,1,2 (stdin, stdout, stderr) + * + * Copyright 2013-2018 IBM Corp. */ + #include <skiboot.h> #include <unistd.h> #include <console.h> @@ -1,23 +1,10 @@ -/* Copyright 2013-2017 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Code to manage and manipulate CPUs * - * 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. + * Copyright 2013-2019 IBM Corp. */ -/* - * TODO: Index array by PIR to be able to catch them easily - * from assembly such as machine checks etc... - */ #include <skiboot.h> #include <cpu.h> #include <device.h> diff --git a/core/cpufeatures.c b/core/cpufeatures.c index 6981dec..ec30c97 100644 --- a/core/cpufeatures.c +++ b/core/cpufeatures.c @@ -1,21 +1,8 @@ -/* Copyright 2017-2019 IBM Corp. - * - * 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. - */ - +// SPDX-License-Identifier: Apache-2.0 /* * This file deals with setup of /cpus/ibm,powerpc-cpu-features dt + * + * Copyright 2017-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/device.c b/core/device.c index 251550e..ce0171b 100644 --- a/core/device.c +++ b/core/device.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Manipulate the device tree * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <stdarg.h> diff --git a/core/direct-controls.c b/core/direct-controls.c index 28191b7..507a16f 100644 --- a/core/direct-controls.c +++ b/core/direct-controls.c @@ -1,17 +1,8 @@ -/* Copyright 2017 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Directly control CPU cores/threads. SRESET, special wakeup, etc * - * 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. + * Copyright 2017-2019 IBM Corp. */ #include <direct-controls.h> diff --git a/core/errorlog.c b/core/errorlog.c index 522dfcc..01e2969 100644 --- a/core/errorlog.c +++ b/core/errorlog.c @@ -1,24 +1,12 @@ -/* Copyright 2013-2017 IBM Corp. - * - * 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. - */ - +// SPDX-License-Identifier: Apache-2.0 /* This file contains the front end for OPAL error logging. It is used * to construct a struct errorlog representing the event/error to be * logged which is then passed to the platform specific backend to log * the actual errors. + * + * Copyright 2013-2017 IBM Corp. */ + #include <skiboot.h> #include <lock.h> #include <errorlog.h> diff --git a/core/exceptions.c b/core/exceptions.c index 4e5c081..90e412b 100644 --- a/core/exceptions.c +++ b/core/exceptions.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Deal with exceptions when in OPAL. * - * 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. + * Copyright 2013-2014 IBM Corp. */ #include <skiboot.h> diff --git a/core/fast-reboot.c b/core/fast-reboot.c index 35c9a2b..ed5f546 100644 --- a/core/fast-reboot.c +++ b/core/fast-reboot.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2019 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Full IPL is slow, let's cheat! * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Produce and consume flattened device trees * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/flash-firmware-versions.c b/core/flash-firmware-versions.c index 59294e4..3e58379 100644 --- a/core/flash-firmware-versions.c +++ b/core/flash-firmware-versions.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2018 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Parse VERSION partition, add to device tree * - * 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. + * Copyright 2013-2018 IBM Corp. */ #include <skiboot.h> diff --git a/core/flash-subpartition.c b/core/flash-subpartition.c index 7931790..06a53a6 100644 --- a/core/flash-subpartition.c +++ b/core/flash-subpartition.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2016 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Parse flash sub-partitions * - * 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. + * Copyright 2013-2018 IBM Corp. */ #include <skiboot.h> diff --git a/core/flash.c b/core/flash.c index 3da6d4a..203b695 100644 --- a/core/flash.c +++ b/core/flash.c @@ -1,18 +1,9 @@ -/* Copyright 2013-2018 IBM Corp. - * Copyright 2018 Raptor Engineering, LLC - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Init, manage, read, write, and load resources from flash * - * 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. + * Copyright 2013-2019 IBM Corp. + * Copyright 2018-2019 Raptor Engineering, LLC */ #include <skiboot.h> diff --git a/core/gcov-profiling.c b/core/gcov-profiling.c index 3ff7e6e..c94438e 100644 --- a/core/gcov-profiling.c +++ b/core/gcov-profiling.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * libgcov skeleton reimplementation to build skiboot with gcov support * - * 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. + * Copyright 2015-2018 IBM Corp. */ #include <skiboot.h> @@ -1,17 +1,8 @@ -/* Copyright 2013-2018 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Deal with Hypervisor Maintenance Interrupts * - * 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. + * Copyright 2013-2019 IBM Corp. */ #define pr_fmt(fmt) "HMI: " fmt @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * I2C * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/init.c b/core/init.c index 7a35da1..2c77c15 100644 --- a/core/init.c +++ b/core/init.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2016 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * skiboot C entry point * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/interrupts.c b/core/interrupts.c index b053401..b0c1da1 100644 --- a/core/interrupts.c +++ b/core/interrupts.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Excuse me, you do work for me now? * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/ipmi-opal.c b/core/ipmi-opal.c index c739546..796508c 100644 --- a/core/ipmi-opal.c +++ b/core/ipmi-opal.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * IPMI OPAL calls * - * 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. + * Copyright 2013-2018 IBM Corp. */ #include <stdlib.h> diff --git a/core/ipmi.c b/core/ipmi.c index 9cf5aa6..566300e 100644 --- a/core/ipmi.c +++ b/core/ipmi.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * in-band IPMI, probably over bt (or via FSP mbox on FSP) * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <stdio.h> diff --git a/core/lock.c b/core/lock.c index 6fbb5eb..9594e05 100644 --- a/core/lock.c +++ b/core/lock.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2018 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Simple spinlock * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/malloc.c b/core/malloc.c index 669cc59..613cff9 100644 --- a/core/malloc.c +++ b/core/malloc.c @@ -1,19 +1,11 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Implement malloc()/free() etc on top of our memory region allocator, + * which provides mem_alloc()/mem_free(). * - * 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. + * Copyright 2013-2015 IBM Corp. */ -/* Wrappers for malloc, et. al. */ + #include <mem_region.h> #include <lock.h> #include <string.h> diff --git a/core/mem_region.c b/core/mem_region.c index 7455192..47d7544 100644 --- a/core/mem_region.c +++ b/core/mem_region.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2018 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Simple memory allocator * - * 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. + * Copyright 2013-2018 IBM Corp. */ #include <inttypes.h> diff --git a/core/nvram-format.c b/core/nvram-format.c index e34add3..15a4a2d 100644 --- a/core/nvram-format.c +++ b/core/nvram-format.c @@ -1,26 +1,13 @@ -/* Copyright 2013-2017 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * NVRAM Format as specified in PAPR * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> #include <nvram.h> -/* - * NVRAM Format as specified in PAPR - */ - struct chrp_nvram_hdr { uint8_t sig; uint8_t cksum; diff --git a/core/nvram.c b/core/nvram.c index 8c68957..ce24684 100644 --- a/core/nvram.c +++ b/core/nvram.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * NVRAM support * - * 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. + * Copyright 2013-2018 IBM Corp. */ #include <skiboot.h> diff --git a/core/opal-msg.c b/core/opal-msg.c index af1ec7d..c393be7 100644 --- a/core/opal-msg.c +++ b/core/opal-msg.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2019 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * OPAL Message queue between host and skiboot * - * 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. + * Copyright 2013-2019 IBM Corp. */ #define pr_fmt(fmt) "opalmsg: " fmt diff --git a/core/opal.c b/core/opal.c index 6508116..151c5d9 100644 --- a/core/opal.c +++ b/core/opal.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Base support for OPAL calls * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/pci-dt-slot.c b/core/pci-dt-slot.c index 448a8f0..5c44955 100644 --- a/core/pci-dt-slot.c +++ b/core/pci-dt-slot.c @@ -1,17 +1,8 @@ -/* Copyright 2017 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * PCI slots in the device tree. * - * 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. + * Copyright 2017-2018 IBM Corp. */ #include <stdarg.h> diff --git a/core/pci-opal.c b/core/pci-opal.c index 94afc6d..213a725 100644 --- a/core/pci-opal.c +++ b/core/pci-opal.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * PCIe OPAL Calls * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/pci-quirk.c b/core/pci-quirk.c index 1007e96..e8f9d22 100644 --- a/core/pci-quirk.c +++ b/core/pci-quirk.c @@ -1,17 +1,8 @@ -/* Copyright 2017 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Deal with PCI device quirks * - * 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. + * Copyright 2017-2018 IBM Corp. */ #define pr_fmt(fmt) "PCI-QUIRK: " fmt diff --git a/core/pci-slot.c b/core/pci-slot.c index d8c8024..ffb54cb 100644 --- a/core/pci-slot.c +++ b/core/pci-slot.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2016 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * PCI Slots * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/pci-virt.c b/core/pci-virt.c index b531470..606e4f5 100644 --- a/core/pci-virt.c +++ b/core/pci-virt.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2016 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Support virtual PCI devices * - * 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. + * Copyright 2013-2016 IBM Corp. */ #include <skiboot.h> @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Base PCI support * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/pcie-slot.c b/core/pcie-slot.c index dc5e4dc..894fd40 100644 --- a/core/pcie-slot.c +++ b/core/pcie-slot.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2016 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * PCIe Slots * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> @@ -1,3 +1,10 @@ +// SPDX-License-Identifier: Apache-2.0 +/* + * Platform Error Log (PEL) generation + * + * Copyright 2014-2016 IBM Corp + */ + #include <string.h> #include <errorlog.h> #include <device.h> diff --git a/core/platform.c b/core/platform.c index efcf63d..7220c6c 100644 --- a/core/platform.c +++ b/core/platform.c @@ -1,20 +1,14 @@ -/* Copyright 2013-2016 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * OPAL Platform abstraction * - * http://www.apache.org/licenses/LICENSE-2.0 + * Some OPAL calls may/may not call into the struct platform that's + * probed during boot. There's also a bunch of platform specific init + * and configuration that's called. * - * 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. + * Copyright 2013-2019 IBM Corp. */ - #include <skiboot.h> #include <opal.h> #include <console.h> diff --git a/core/pool.c b/core/pool.c index adf6c90..9294f8c 100644 --- a/core/pool.c +++ b/core/pool.c @@ -1,20 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. - */ - -/* This file provides some functions to manage a pool of pre-allocated +// SPDX-License-Identifier: Apache-2.0 +/* + * This file provides some functions to manage a pool of pre-allocated * objects. It also provides a method to reserve a pre-defined number * of objects for higher priorty requests. The allocations follow the * following rules: @@ -26,6 +12,8 @@ * 3. When an allocation is freed it is always added to the high priority * pool if there are less than the reserved number of allocations * available. + * + * Copyright 2013-2014 IBM Corp. */ #include <pool.h> diff --git a/core/powercap.c b/core/powercap.c index 50b5996..b9d172b 100644 --- a/core/powercap.c +++ b/core/powercap.c @@ -1,17 +1,8 @@ -/* Copyright 2017 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * OPAL calls to get/set power caps * - * 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. + * Copyright 2017 IBM Corp. */ #include <powercap.h> @@ -1,17 +1,10 @@ -/* Copyright 2017 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * OPAL calls to get/set Power Shift Ratio (PSR) * - * 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 + * i.e. when something has to be throttled, what gets throttled? * - * 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. + * Copyright 2017 IBM Corp. */ #include <psr.h> diff --git a/core/relocate.c b/core/relocate.c index 7255803..8e1f1b2 100644 --- a/core/relocate.c +++ b/core/relocate.c @@ -1,27 +1,17 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Relocate ourselves * - * 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 + * WARNING: This code is used to self-relocate, it cannot have any + * global reference nor TOC reference. It's also called before BSS + * is cleared. * - * 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. + * Copyright 2013-2015 IBM Corp. */ #include <stdbool.h> #include <elf.h> -/* WARNING: This code is used to self-relocate, it cannot have any - * global reference nor TOC reference. It's also called before BSS - * is cleared. - */ - /* Called from head.S, thus no header. */ int relocate(uint64_t offset, struct elf64_dyn *dyn, struct elf64_rela *rela); @@ -1,20 +1,10 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Real Time Clock (RTC) Cache * - * 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. + * Copyright 2013-2014 IBM Corp. */ - #include <skiboot.h> #include <lock.h> #include <rtc.h> diff --git a/core/sensor.c b/core/sensor.c index bd329a1..a804f96 100644 --- a/core/sensor.c +++ b/core/sensor.c @@ -1,20 +1,10 @@ -/* Copyright 2013-2018 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * OPAL Sensor APIs * - * 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. + * Copyright 2013-2018 IBM Corp. */ - #include <sensor.h> #include <skiboot.h> #include <device.h> diff --git a/core/stack.c b/core/stack.c index b5a352d..711761b 100644 --- a/core/stack.c +++ b/core/stack.c @@ -1,20 +1,10 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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 +// SPDX-License-Identifier: Apache-2.0 +/* + * Create/Print backtraces, check stack usage etc. * - * 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. + * Copyright 2013-2019 IBM Corp. */ - #include <skiboot.h> #include <processor.h> #include <cpu.h> diff --git a/core/test/dummy-cpu.h b/core/test/dummy-cpu.h index 88b54ce..804a047 100644 --- a/core/test/dummy-cpu.h +++ b/core/test/dummy-cpu.h @@ -1,20 +1,8 @@ -/* Copyright 2013-2018 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2018 IBM Corp. * - * 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. - */ - -/* A dummy cpu.h for tests. + * A dummy cpu.h for tests. * We don't want to include the real skiboot cpu.h, it's PPC-specific */ diff --git a/core/test/run-api-test.c b/core/test/run-api-test.c index 583910d..1029c7d 100644 --- a/core/test/run-api-test.c +++ b/core/test/run-api-test.c @@ -1,20 +1,7 @@ -/* Copyright 2014-2016 IBM Corp. - * - * 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. - */ - +// SPDX-License-Identifier: Apache-2.0 /* + * Copyright 2014-2016 IBM Corp. + * * For now it just validates that addresses passed are sane and test the * wrapper that validates addresses */ diff --git a/core/test/run-bitmap.c b/core/test/run-bitmap.c index 7c68460..2c7cea7 100644 --- a/core/test/run-bitmap.c +++ b/core/test/run-bitmap.c @@ -1,18 +1,8 @@ -/* Copyright 2017 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2017 IBM Corp. */ + #include "../bitmap.c" #include <assert.h> #include <stdlib.h> diff --git a/core/test/run-buddy.c b/core/test/run-buddy.c index a0a933d..6f7957d 100644 --- a/core/test/run-buddy.c +++ b/core/test/run-buddy.c @@ -1,17 +1,6 @@ -/* Copyright 2016-2017 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2016-2017 IBM Corp. */ #include <buddy.h> #include <assert.h> diff --git a/core/test/run-console-log-buf-overrun.c b/core/test/run-console-log-buf-overrun.c index 01fca9b..05cc414 100644 --- a/core/test/run-console-log-buf-overrun.c +++ b/core/test/run-console-log-buf-overrun.c @@ -1,17 +1,6 @@ -/* Copyright 2014-2015 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2014-2015 IBM Corp. */ #include <config.h> diff --git a/core/test/run-console-log-pr_fmt.c b/core/test/run-console-log-pr_fmt.c index ae9d206..ba15fd3 100644 --- a/core/test/run-console-log-pr_fmt.c +++ b/core/test/run-console-log-pr_fmt.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/run-console-log.c b/core/test/run-console-log.c index 01376ee..71c1d6a 100644 --- a/core/test/run-console-log.c +++ b/core/test/run-console-log.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/run-cpufeatures.c b/core/test/run-cpufeatures.c index c072e5f..1ec8c22 100644 --- a/core/test/run-cpufeatures.c +++ b/core/test/run-cpufeatures.c @@ -1,17 +1,6 @@ -/* Copyright 2019 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2019 IBM Corp. */ #include <skiboot.h> diff --git a/core/test/run-device.c b/core/test/run-device.c index 287d5a8..ca160bc 100644 --- a/core/test/run-device.c +++ b/core/test/run-device.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <skiboot.h> diff --git a/core/test/run-flash-firmware-versions.c b/core/test/run-flash-firmware-versions.c index 8fff714..33baf4d 100644 --- a/core/test/run-flash-firmware-versions.c +++ b/core/test/run-flash-firmware-versions.c @@ -1,17 +1,6 @@ -/* Copyright 2018 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2018 IBM Corp. */ #include <stdlib.h> diff --git a/core/test/run-flash-subpartition.c b/core/test/run-flash-subpartition.c index 419de88..bc41dbf 100644 --- a/core/test/run-flash-subpartition.c +++ b/core/test/run-flash-subpartition.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2016 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2016 IBM Corp. */ #include <skiboot.h> diff --git a/core/test/run-malloc-speed.c b/core/test/run-malloc-speed.c index 94e96e7..bafd5af 100644 --- a/core/test/run-malloc-speed.c +++ b/core/test/run-malloc-speed.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2015 IBM Corp. */ #include <config.h> diff --git a/core/test/run-malloc.c b/core/test/run-malloc.c index cb68768..7e7bfcd 100644 --- a/core/test/run-malloc.c +++ b/core/test/run-malloc.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/run-mem_range_is_reserved.c b/core/test/run-mem_range_is_reserved.c index 8d70a24..ea276b7 100644 --- a/core/test/run-mem_range_is_reserved.c +++ b/core/test/run-mem_range_is_reserved.c @@ -1,17 +1,6 @@ -/* Copyright 2015 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2015 IBM Corp. */ #include <config.h> diff --git a/core/test/run-mem_region.c b/core/test/run-mem_region.c index d48f552..fea256e 100644 --- a/core/test/run-mem_region.c +++ b/core/test/run-mem_region.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/run-mem_region_init.c b/core/test/run-mem_region_init.c index b6d33f5..4f849fe 100644 --- a/core/test/run-mem_region_init.c +++ b/core/test/run-mem_region_init.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/run-mem_region_next.c b/core/test/run-mem_region_next.c index 3228d4f..9f1180b 100644 --- a/core/test/run-mem_region_next.c +++ b/core/test/run-mem_region_next.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2015 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2015 IBM Corp. */ #include <config.h> diff --git a/core/test/run-mem_region_release_unused.c b/core/test/run-mem_region_release_unused.c index 1834a4c..e5811ef 100644 --- a/core/test/run-mem_region_release_unused.c +++ b/core/test/run-mem_region_release_unused.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/run-mem_region_release_unused_noalloc.c b/core/test/run-mem_region_release_unused_noalloc.c index 9ee2742..99b2ff5 100644 --- a/core/test/run-mem_region_release_unused_noalloc.c +++ b/core/test/run-mem_region_release_unused_noalloc.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/run-mem_region_reservations.c b/core/test/run-mem_region_reservations.c index 6cb1361..3a8a645 100644 --- a/core/test/run-mem_region_reservations.c +++ b/core/test/run-mem_region_reservations.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2015 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2015 IBM Corp. */ #include <config.h> diff --git a/core/test/run-msg.c b/core/test/run-msg.c index 34bb424..8b79f17 100644 --- a/core/test/run-msg.c +++ b/core/test/run-msg.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2019 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2019 IBM Corp. */ #include <inttypes.h> #include <stdbool.h> diff --git a/core/test/run-nvram-format.c b/core/test/run-nvram-format.c index c8a7583..d421880 100644 --- a/core/test/run-nvram-format.c +++ b/core/test/run-nvram-format.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <stdlib.h> diff --git a/core/test/run-pel.c b/core/test/run-pel.c index 433842b..72b4c32 100644 --- a/core/test/run-pel.c +++ b/core/test/run-pel.c @@ -1,20 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. * - * 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. - */ - -/* Test for our PEL record generation. Currently this doesn't actually + * Test for our PEL record generation. Currently this doesn't actually * test that the records we generate are correct, but it at least lets * us run valgrind over the generation routines to check for buffer * overflows, etc. diff --git a/core/test/run-time-utils.c b/core/test/run-time-utils.c index 21c9978..26b8a38 100644 --- a/core/test/run-time-utils.c +++ b/core/test/run-time-utils.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2015 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2015 IBM Corp. */ #include <config.h> diff --git a/core/test/run-timebase.c b/core/test/run-timebase.c index 38c41fd..2771db3 100644 --- a/core/test/run-timebase.c +++ b/core/test/run-timebase.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2015 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2015 IBM Corp. */ #include <stdint.h> diff --git a/core/test/run-trace.c b/core/test/run-trace.c index 10494a2..7350ee5 100644 --- a/core/test/run-trace.c +++ b/core/test/run-trace.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <config.h> diff --git a/core/test/stubs.c b/core/test/stubs.c index 0a8d852..343ee9f 100644 --- a/core/test/stubs.c +++ b/core/test/stubs.c @@ -1,17 +1,6 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright 2013-2014 IBM Corp. */ #include <stdlib.h> #include <stdio.h> diff --git a/core/time-utils.c b/core/time-utils.c index 8a02f46..97ca962 100644 --- a/core/time-utils.c +++ b/core/time-utils.c @@ -1,21 +1,4 @@ -/* Copyright 2013-2014 IBM Corp. - * - * 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. - */ - -#include <time-utils.h> - +// SPDX-License-Identifier: Apache-2.0 /* * Converts an OPAL formatted datetime into a struct tm. We ignore microseconds * as Linux doesn't use them anyway. @@ -25,8 +8,12 @@ * | hour | minute | secs | reserved | * +------------------------------------+ * | microseconds | + * + * Copyright 2013-2014 IBM Corp. */ +#include <time-utils.h> + void datetime_to_tm(uint32_t y_m_d, uint64_t h_m_s_m, struct tm *tm) { uint32_t x; diff --git a/core/timebase.c b/core/timebase.c index b1a02a4..4cb0b51 100644 --- a/core/timebase.c +++ b/core/timebase.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Wait for things, by waiting for timebase to tick over * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <timebase.h> @@ -44,6 +35,7 @@ static void time_wait_poll(unsigned long duration) } while (tb_compare(now, end) != TB_AAFTERB) { + unsigned long remaining = end - now; /* Call pollers periodically but not continually to avoid diff --git a/core/timer.c b/core/timer.c index 8f754cd..5cf9069 100644 --- a/core/timer.c +++ b/core/timer.c @@ -1,3 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +/* + * run something, but later. + * + * Timers are run when the SBE timer interrupt triggers (based on us setting + * it) or when the regular heartbeat call from the OS occurs and there's a + * timer that's expired. + * + * Copyright 2014-2019 IBM Corp. + */ + #include <timer.h> #include <timebase.h> #include <lock.h> diff --git a/core/trace.c b/core/trace.c index de6b661..614be08 100644 --- a/core/trace.c +++ b/core/trace.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Trace various things into in-memory buffers * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <trace.h> diff --git a/core/utils.c b/core/utils.c index 508bba9..728cea4 100644 --- a/core/utils.c +++ b/core/utils.c @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Misc utility functions * - * 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. + * Copyright 2013-2018 IBM Corp. */ #include <skiboot.h> @@ -1,17 +1,8 @@ -/* Copyright 2013-2014 IBM Corp. +// SPDX-License-Identifier: Apache-2.0 +/* + * Parse Vital Product Data (VPD) * - * 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. + * Copyright 2013-2019 IBM Corp. */ #include <skiboot.h> |