summaryrefslogtreecommitdiffstats
path: root/bsps/i386/pc386
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/i386/pc386')
-rw-r--r--bsps/i386/pc386/ata/ide.c41
-rw-r--r--bsps/i386/pc386/ata/idecfg.c33
-rw-r--r--bsps/i386/pc386/clock/ckinit.c27
-rw-r--r--bsps/i386/pc386/console/conscfg.c25
-rw-r--r--bsps/i386/pc386/console/console_control.c25
-rw-r--r--bsps/i386/pc386/console/console_select.c25
-rw-r--r--bsps/i386/pc386/console/exar17d15x.c31
-rw-r--r--bsps/i386/pc386/console/fb_vesa_rm.c19
-rw-r--r--bsps/i386/pc386/console/gdb_glue.c25
-rw-r--r--bsps/i386/pc386/console/gdb_select.c25
-rw-r--r--bsps/i386/pc386/console/i386-stub.c2
-rw-r--r--bsps/i386/pc386/console/outch.c14
-rw-r--r--bsps/i386/pc386/console/printk_support.c25
-rw-r--r--bsps/i386/pc386/console/ps2_mouse.c2
-rw-r--r--bsps/i386/pc386/console/rtd316.c29
-rw-r--r--bsps/i386/pc386/console/serial_mouse_config.c25
-rw-r--r--bsps/i386/pc386/console/tty_drv.c4
-rw-r--r--bsps/i386/pc386/console/uart_bus_pci.c16
-rw-r--r--bsps/i386/pc386/console/vgacons.c33
-rw-r--r--bsps/i386/pc386/include/bsp/bspimpl.h25
-rw-r--r--bsps/i386/pc386/include/bsp/exar17d15x.h25
-rw-r--r--bsps/i386/pc386/include/bsp/rtd316.h29
-rw-r--r--bsps/i386/pc386/include/edid.h2
-rw-r--r--bsps/i386/pc386/include/rtems/vgacons.h25
-rw-r--r--bsps/i386/pc386/include/tm27.h2
-rw-r--r--bsps/i386/pc386/start/bsp_fatal_halt.c25
-rw-r--r--bsps/i386/pc386/start/bsp_specs0
-rw-r--r--bsps/i386/pc386/start/bspgetworkarea.c2
-rw-r--r--bsps/i386/pc386/start/bspidle.S2
-rw-r--r--bsps/i386/pc386/start/bspreset.c25
-rw-r--r--bsps/i386/pc386/start/linkcmds4
-rw-r--r--bsps/i386/pc386/start/realmode_int.c9
32 files changed, 473 insertions, 128 deletions
diff --git a/bsps/i386/pc386/ata/ide.c b/bsps/i386/pc386/ata/ide.c
index 52877cf60b..04cf943939 100644
--- a/bsps/i386/pc386/ata/ide.c
+++ b/bsps/i386/pc386/ata/ide.c
@@ -1,27 +1,20 @@
-/*===============================================================*\
-| Project: RTEMS PC386 IDE harddisc driver |
-+-----------------------------------------------------------------+
-| File: ide.c |
-+-----------------------------------------------------------------+
-| Copyright (c) 2003 IMD |
-| Ingenieurbuero fuer Microcomputertechnik Th. Doerfler |
-| <Thomas.Doerfler@imd-systems.de> |
-| all rights reserved |
-+-----------------------------------------------------------------+
-| this file contains the BSP layer for IDE access below the |
-| libchip IDE harddisc driver |
-| based on a board specific driver from |
-| Eugeny S. Mints, Oktet |
-| |
-| The license and distribution terms for this file may be |
-| found in the file LICENSE in this distribution or at |
-| http://www.rtems.org/license/LICENSE. |
-| |
-+-----------------------------------------------------------------+
-| date history ID |
-| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
-| 01.14.03 creation doe |
-\*===============================================================*/
+/*
+ * RTEMS PC386 IDE harddisc driver
+ *
+ * This file contains the BSP layer for IDE access below the
+ * libchip IDE harddisc driver.
+ * based on a board specific driver from
+ * Eugeny S. Mints, Oktet
+ */
+
+/*
+ * Copyright (c) 2003 IMD Ingenieurbuero fuer Microcomputertechnik
+ * All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
#include <inttypes.h>
diff --git a/bsps/i386/pc386/ata/idecfg.c b/bsps/i386/pc386/ata/idecfg.c
index 371a6eea53..35d4a790f2 100644
--- a/bsps/i386/pc386/ata/idecfg.c
+++ b/bsps/i386/pc386/ata/idecfg.c
@@ -1,21 +1,18 @@
-/*===============================================================*\
-| Project: RTEMS PC386 IDE harddisc driver tables |
-+-----------------------------------------------------------------+
-| File: idecfg.c |
-+-----------------------------------------------------------------+
-| Copyright (c) 2003 IMD |
-| Ingenieurbuero fuer Microcomputertechnik Th. Doerfler |
-| <Thomas.Doerfler@imd-systems.de> |
-| all rights reserved |
-+-----------------------------------------------------------------+
-| this file contains the table of functions for the BSP layer |
-| for IDE access below the libchip IDE harddisc driver |
-| |
-+-----------------------------------------------------------------+
-| date history ID |
-| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
-| 01.14.03 creation doe |
-\*===============================================================*/
+/*
+ * RTEMS PC386 IDE harddisc driver tables
+ *
+ * This file contains the table of functions for the BSP layer
+ * for IDE access below the libchip IDE harddisc driver.
+ */
+
+/*
+ * Copyright (c) 2003 IMD Ingenieurbuero fuer Microcomputertechnik
+ * All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
#include <rtems.h>
#include <bsp.h>
diff --git a/bsps/i386/pc386/clock/ckinit.c b/bsps/i386/pc386/clock/ckinit.c
index 2df1818dd3..d0519ee061 100644
--- a/bsps/i386/pc386/clock/ckinit.c
+++ b/bsps/i386/pc386/clock/ckinit.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -18,9 +20,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <bsp.h>
@@ -68,7 +87,7 @@ extern volatile uint32_t Clock_driver_ticks;
#ifdef RTEMS_SMP
-#define Clock_driver_support_at_tick() \
+#define Clock_driver_support_at_tick(arg) \
do { \
Processor_mask targets; \
_Processor_mask_Assign(&targets, _SMP_Get_online_processors()); \
diff --git a/bsps/i386/pc386/console/conscfg.c b/bsps/i386/pc386/console/conscfg.c
index 8aa8ab5c2a..e45631504c 100644
--- a/bsps/i386/pc386/console/conscfg.c
+++ b/bsps/i386/pc386/console/conscfg.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2014, 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <bsp.h>
diff --git a/bsps/i386/pc386/console/console_control.c b/bsps/i386/pc386/console/console_control.c
index a04ae2bc3b..9647c56630 100644
--- a/bsps/i386/pc386/console/console_control.c
+++ b/bsps/i386/pc386/console/console_control.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This file is an extension of the generic console driver
* shell used by all console drivers using libchip, it contains
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <bsp.h>
diff --git a/bsps/i386/pc386/console/console_select.c b/bsps/i386/pc386/console/console_select.c
index 1c064fb271..6c7af215ba 100644
--- a/bsps/i386/pc386/console/console_select.c
+++ b/bsps/i386/pc386/console/console_select.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -13,9 +15,26 @@
* COPYRIGHT (c) 2011-2012, 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <limits.h>
diff --git a/bsps/i386/pc386/console/exar17d15x.c b/bsps/i386/pc386/console/exar17d15x.c
index 5cf615ac86..787e9a24d0 100644
--- a/bsps/i386/pc386/console/exar17d15x.c
+++ b/bsps/i386/pc386/console/exar17d15x.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <bsp.h>
@@ -75,7 +94,7 @@ typedef struct {
/*
* Register Access Routines
*/
-static uint8_t xr17d15x_get_register(uint32_t addr, uint8_t i)
+static uint8_t xr17d15x_get_register(uintptr_t addr, uint8_t i)
{
uint8_t val = 0;
volatile uint8_t *reg = (volatile uint8_t *)(addr + i);
@@ -85,7 +104,7 @@ static uint8_t xr17d15x_get_register(uint32_t addr, uint8_t i)
return val;
}
-static void xr17d15x_set_register(uint32_t addr, uint8_t i, uint8_t val)
+static void xr17d15x_set_register(uintptr_t addr, uint8_t i, uint8_t val)
{
volatile uint8_t *reg = (volatile uint8_t *)(addr + i);
@@ -168,7 +187,7 @@ rtems_device_driver exar17d15x_initialize(
printk(
"Found Exar 17D15x %d at 0x%08lx IRQ %d with %d ports\n",
instance,
- conf[instance].base,
+ (uintptr_t) conf[instance].base,
conf[instance].irq,
conf[instance].ports
);
diff --git a/bsps/i386/pc386/console/fb_vesa_rm.c b/bsps/i386/pc386/console/fb_vesa_rm.c
index 3263bc262b..d14aa826d6 100644
--- a/bsps/i386/pc386/console/fb_vesa_rm.c
+++ b/bsps/i386/pc386/console/fb_vesa_rm.c
@@ -63,6 +63,17 @@
#define FB_VESA_NAME "FB_VESA_RM"
+/*
+ * GCC complains that access to packed data may not be aligned and
+ * fair enough. The warning is:
+ *
+ * warning: taking address of packed member of 'struct <anonymous>' may
+ * result in an unaligned pointer value [-Waddress-of-packed-member]
+ *
+ * Disable the warning.
+ */
+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
+
/**
* @brief Allows to enable initialization of VESA real mode driver from
* an application by setting the value of this variable to non null value in
@@ -788,7 +799,7 @@ void vesa_realmode_bootup_init(void)
(vbe_ret_val>>8)!=VBE_callSuccessful)
{
printk(FB_VESA_NAME " Cannot get mode info anymore. ax=0x%lx\n",
- vbe_ret_val);
+ (uintptr_t) vbe_ret_val);
}
fb_var.xres = mib->XResolution;
@@ -970,9 +981,9 @@ frame_buffer_control(
{
rtems_libio_ioctl_args_t *args = arg;
- printk( FB_VESA_NAME " ioctl called, cmd=%" PRIx32 "\n", args->command );
- printk("fbxres %lu, fbyres %lu\n", fb_var.xres, fb_var.yres);
- printk("fbbpp %lu\n", fb_var.bits_per_pixel);
+ printk( FB_VESA_NAME " ioctl called, cmd=%lx\n", (uintptr_t) args->command );
+ printk("fbxres %d, fbyres %d\n", (int) fb_var.xres, (int) fb_var.yres);
+ printk("fbbpp %d\n", (int) fb_var.bits_per_pixel);
switch (args->command)
{
diff --git a/bsps/i386/pc386/console/gdb_glue.c b/bsps/i386/pc386/console/gdb_glue.c
index aededea7e8..74f086ba72 100644
--- a/bsps/i386/pc386/console/gdb_glue.c
+++ b/bsps/i386/pc386/console/gdb_glue.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/* gdb_glue
*
* Interface to initialize the GDB.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <bsp.h>
diff --git a/bsps/i386/pc386/console/gdb_select.c b/bsps/i386/pc386/console/gdb_select.c
index 0fe3b2cdad..c8797ebe5d 100644
--- a/bsps/i386/pc386/console/gdb_select.c
+++ b/bsps/i386/pc386/console/gdb_select.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -14,9 +16,26 @@
* COPYRIGHT (c) 2016.
* Chris Johns <chrisj@rtems.org>
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <stdlib.h>
diff --git a/bsps/i386/pc386/console/i386-stub.c b/bsps/i386/pc386/console/i386-stub.c
index 1eff100e9e..4b237e0a34 100644
--- a/bsps/i386/pc386/console/i386-stub.c
+++ b/bsps/i386/pc386/console/i386-stub.c
@@ -502,7 +502,7 @@ getpacket (char *buffer)
count = 0;
/* now, read until a # or end of buffer is found */
- while (count < BUFMAX)
+ while (count < (BUFMAX - 1))
{
ch = getDebugChar () & 0x7f;
if (ch == '#')
diff --git a/bsps/i386/pc386/console/outch.c b/bsps/i386/pc386/console/outch.c
index 90ffedf250..83dbcdbcdf 100644
--- a/bsps/i386/pc386/console/outch.c
+++ b/bsps/i386/pc386/console/outch.c
@@ -283,7 +283,13 @@ static int escaped = 0;
void
_IBMPC_initVideo(void)
{
- unsigned char* pt = (unsigned char*) (VIDEO_MODE_ADDR);
+ /*
+ * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c16
+ */
+ unsigned char* volatile pt = (unsigned char*) (VIDEO_MODE_ADDR);
+ unsigned short* volatile crt_base = (unsigned short*) DISPLAY_CRT_BASE_IO_ADDR;
+ uint8_t* volatile nb_max_row = (uint8_t*) NB_MAX_ROW_ADDR;
+ uint16_t* volatile nb_max_col = (uint16_t*) NB_MAX_COL_ADDR;
if (*pt == VGAMODE7) {
bitMapBaseAddr = (unsigned short*) V_MONO;
@@ -291,9 +297,9 @@ _IBMPC_initVideo(void)
else {
bitMapBaseAddr = (unsigned short*) V_COLOR;
}
- ioCrtBaseAddr = *(unsigned short*) DISPLAY_CRT_BASE_IO_ADDR;
- maxCol = * (unsigned short*) NB_MAX_COL_ADDR;
- maxRow = * (unsigned char*) NB_MAX_ROW_ADDR;
+ ioCrtBaseAddr = *crt_base;
+ maxCol = *nb_max_col;
+ maxRow = *nb_max_row;
column = 0;
row = 0;
attribute = ((BLACK << 4) | WHITE)<<8;
diff --git a/bsps/i386/pc386/console/printk_support.c b/bsps/i386/pc386/console/printk_support.c
index c9e003dab0..324bc58cd9 100644
--- a/bsps/i386/pc386/console/printk_support.c
+++ b/bsps/i386/pc386/console/printk_support.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* @file
*
@@ -12,9 +14,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <rtems.h>
diff --git a/bsps/i386/pc386/console/ps2_mouse.c b/bsps/i386/pc386/console/ps2_mouse.c
index 6a3f8551b4..581598d605 100644
--- a/bsps/i386/pc386/console/ps2_mouse.c
+++ b/bsps/i386/pc386/console/ps2_mouse.c
@@ -481,7 +481,7 @@ rtems_device_driver paux_open(
NULL, /* setAttributes */
NULL, /* stopRemoteTx */
NULL, /* startRemoteTx */
- 0 /* outputUsesInterrupts */
+ TERMIOS_POLLED /* outputUsesInterrupts */
};
status = rtems_termios_open (major, minor, arg, &cb );
diff --git a/bsps/i386/pc386/console/rtd316.c b/bsps/i386/pc386/console/rtd316.c
index c8f3c3a6ef..193c0249ae 100644
--- a/bsps/i386/pc386/console/rtd316.c
+++ b/bsps/i386/pc386/console/rtd316.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <bsp.h>
@@ -30,7 +49,7 @@
#define RTD_CLOCK_RATE (460800 * 32)
-uint8_t rtd316_com_get_register(uint32_t addr, uint8_t reg)
+uint8_t rtd316_com_get_register(uintptr_t addr, uint8_t reg)
{
register uint8_t val = 0;
@@ -41,7 +60,7 @@ uint8_t rtd316_com_get_register(uint32_t addr, uint8_t reg)
return val;
}
-void rtd316_com_set_register(uint32_t addr,uint8_t reg, uint8_t val)
+void rtd316_com_set_register(uintptr_t addr, uint8_t reg, uint8_t val)
{
outport_byte( addr, reg );
/* It appears the no delay is needed between the accesses. */
diff --git a/bsps/i386/pc386/console/serial_mouse_config.c b/bsps/i386/pc386/console/serial_mouse_config.c
index a8a0313954..f1ff2dab17 100644
--- a/bsps/i386/pc386/console/serial_mouse_config.c
+++ b/bsps/i386/pc386/console/serial_mouse_config.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <stdio.h>
diff --git a/bsps/i386/pc386/console/tty_drv.c b/bsps/i386/pc386/console/tty_drv.c
index 121820061a..dcec080b54 100644
--- a/bsps/i386/pc386/console/tty_drv.c
+++ b/bsps/i386/pc386/console/tty_drv.c
@@ -264,8 +264,8 @@ conSetAttr(int port, int minor, const struct termios *t)
stopbits = 0;
}
- printk("Setting attributes, port=%X, baud=%" PRId32 ", linemode = 0x%02" PRIx32 "\n",
- port, baud, databits | parity | stopbits );
+ printk("Setting attributes, port=%X, baud=%d, linemode = 0x%02x\n",
+ port, (int) baud, (int) (databits | parity | stopbits) );
BSP_uart_set_attributes(port, baud, databits, parity, stopbits);
return 0;
}
diff --git a/bsps/i386/pc386/console/uart_bus_pci.c b/bsps/i386/pc386/console/uart_bus_pci.c
index 2ad8323f05..763d90d5b8 100644
--- a/bsps/i386/pc386/console/uart_bus_pci.c
+++ b/bsps/i386/pc386/console/uart_bus_pci.c
@@ -260,7 +260,7 @@ typedef struct {
#define UART_PCI_IO (0)
-static uint8_t pci_ns16550_mem_get_register(uint32_t addr, uint8_t i)
+static uint8_t pci_ns16550_mem_get_register(uintptr_t addr, uint8_t i)
{
uint8_t val = 0;
volatile uint32_t *reg = (volatile uint32_t *)(addr + (i*4));
@@ -270,7 +270,7 @@ static uint8_t pci_ns16550_mem_get_register(uint32_t addr, uint8_t i)
return val;
}
-static void pci_ns16550_mem_set_register(uint32_t addr, uint8_t i, uint8_t val)
+static void pci_ns16550_mem_set_register(uintptr_t addr, uint8_t i, uint8_t val)
{
volatile uint32_t *reg = (volatile uint32_t *)(addr + (i*4));
if (UART_PCI_IO)
@@ -281,7 +281,7 @@ static void pci_ns16550_mem_set_register(uint32_t addr, uint8_t i, uint8_t val)
/*
* IO Register Access Routines
*/
-static uint8_t pci_ns16550_io_get_register(uint32_t addr, uint8_t i)
+static uint8_t pci_ns16550_io_get_register(uintptr_t addr, uint8_t i)
{
uint8_t val = rtems_inb(addr + i);
if (UART_PCI_IO)
@@ -289,7 +289,7 @@ static uint8_t pci_ns16550_io_get_register(uint32_t addr, uint8_t i)
return val;
}
-static void pci_ns16550_io_set_register(uint32_t addr, uint8_t i, uint8_t val)
+static void pci_ns16550_io_set_register(uintptr_t addr, uint8_t i, uint8_t val)
{
if (UART_PCI_IO)
printk( "WR(%p <- 0x%02x) ", (void*) addr + i, val );
@@ -452,11 +452,11 @@ void pci_uart_probe(void)
port_p->ulIntVector = conf[b].irq;
- printk(
- "%s:%d:%s,%s:0x%lx%s%s,irq:%d,clk:%lu\n", /* */
+ printk(
+ "%s:%d:%s,%s:0x%lx%s%s,irq:%d,clk:%lu\n", /* */
name, b, conf[b].desc,
- io ? "io" : "mem", base, locatable, prefectable,
- conf[b].irq, conf[b].clock
+ io ? "io" : "mem", (uintptr_t) base, locatable, prefectable,
+ conf[b].irq, (uintptr_t) conf[b].clock
);
diff --git a/bsps/i386/pc386/console/vgacons.c b/bsps/i386/pc386/console/vgacons.c
index 2886496e51..a3b326d8e1 100644
--- a/bsps/i386/pc386/console/vgacons.c
+++ b/bsps/i386/pc386/console/vgacons.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* This file contains the termios TTY driver for the i386
* vga.
@@ -5,9 +7,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <rtems.h>
@@ -151,8 +170,12 @@ bool vgacons_probe(
rtems_status_code status;
static bool firstTime = true;
- if ((*(unsigned char*) NB_MAX_ROW_ADDR == 0) &&
- (*(unsigned short*)NB_MAX_COL_ADDR == 0)) {
+ /*
+ * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c16
+ */
+ const uint8_t* volatile nb_max_row = (const uint8_t*) NB_MAX_ROW_ADDR;
+ const uint16_t* volatile nb_max_col = (const uint16_t*) NB_MAX_COL_ADDR;
+ if ((*nb_max_row == 0) && (*nb_max_col == 0)) {
return false;
}
diff --git a/bsps/i386/pc386/include/bsp/bspimpl.h b/bsps/i386/pc386/include/bsp/bspimpl.h
index 314fb91eb9..35d2c0974c 100644
--- a/bsps/i386/pc386/include/bsp/bspimpl.h
+++ b/bsps/i386/pc386/include/bsp/bspimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -8,9 +10,26 @@
* COPYRIGHT (c) 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#ifndef __BSPIMPL_h
diff --git a/bsps/i386/pc386/include/bsp/exar17d15x.h b/bsps/i386/pc386/include/bsp/exar17d15x.h
index ea785a397b..79de882219 100644
--- a/bsps/i386/pc386/include/bsp/exar17d15x.h
+++ b/bsps/i386/pc386/include/bsp/exar17d15x.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#ifndef _BSP_EXAR17D15X__h
diff --git a/bsps/i386/pc386/include/bsp/rtd316.h b/bsps/i386/pc386/include/bsp/rtd316.h
index 28fe6f47db..0bc99d24e8 100644
--- a/bsps/i386/pc386/include/bsp/rtd316.h
+++ b/bsps/i386/pc386/include/bsp/rtd316.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#ifndef _BSP_RTD_316_h
@@ -57,7 +76,7 @@ rtems_device_driver rtd316_initialize(
*
* @return This method returns the value of the register.
*/
-uint8_t rtd316_com_get_register(uint32_t addr, uint8_t reg);
+uint8_t rtd316_com_get_register(uintptr_t addr, uint8_t reg);
/**
* @brief RTD316 Set Register Helper
@@ -67,7 +86,7 @@ uint8_t rtd316_com_get_register(uint32_t addr, uint8_t reg);
* @param[in] addr is the base address
* @param[in] reg is the register number
*/
-void rtd316_com_set_register(uint32_t addr,uint8_t reg, uint8_t val);
+void rtd316_com_set_register(uintptr_t addr,uint8_t reg, uint8_t val);
#ifdef __cplusplus
}
diff --git a/bsps/i386/pc386/include/edid.h b/bsps/i386/pc386/include/edid.h
index c76cec8330..9945ee5ae7 100644
--- a/bsps/i386/pc386/include/edid.h
+++ b/bsps/i386/pc386/include/edid.h
@@ -34,7 +34,7 @@ extern "C" {
#endif /* __cplusplus */
#include <rtems/score/basedefs.h>
-#define EDID_INLINE_ROUTINE RTEMS_INLINE_ROUTINE
+#define EDID_INLINE_ROUTINE static inline
/* VESA Enhanced Extended Display Identification Data (E-EDID) Proposed
Release A, March 27, 2007 */
diff --git a/bsps/i386/pc386/include/rtems/vgacons.h b/bsps/i386/pc386/include/rtems/vgacons.h
index de80ef3664..61a55bf86a 100644
--- a/bsps/i386/pc386/include/rtems/vgacons.h
+++ b/bsps/i386/pc386/include/rtems/vgacons.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#ifndef _VGACONS_H_
diff --git a/bsps/i386/pc386/include/tm27.h b/bsps/i386/pc386/include/tm27.h
index 229590b6bc..6286169ca5 100644
--- a/bsps/i386/pc386/include/tm27.h
+++ b/bsps/i386/pc386/include/tm27.h
@@ -27,7 +27,7 @@
#define MUST_WAIT_FOR_INTERRUPT 0
-#define Install_tm27_vector(handler)
+#define Install_tm27_vector(handler) (void) handler
#define Cause_tm27_intr() __asm__ volatile("int $0x90" : :);
diff --git a/bsps/i386/pc386/start/bsp_fatal_halt.c b/bsps/i386/pc386/start/bsp_fatal_halt.c
index 954955dee1..e55de824c2 100644
--- a/bsps/i386/pc386/start/bsp_fatal_halt.c
+++ b/bsps/i386/pc386/start/bsp_fatal_halt.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* COPYRIGHT (c) 2016.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <rtems/score/cpuimpl.h>
diff --git a/bsps/i386/pc386/start/bsp_specs b/bsps/i386/pc386/start/bsp_specs
deleted file mode 100644
index e69de29bb2..0000000000
--- a/bsps/i386/pc386/start/bsp_specs
+++ /dev/null
diff --git a/bsps/i386/pc386/start/bspgetworkarea.c b/bsps/i386/pc386/start/bspgetworkarea.c
index acbb60a823..b748f21ee9 100644
--- a/bsps/i386/pc386/start/bspgetworkarea.c
+++ b/bsps/i386/pc386/start/bspgetworkarea.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright (C) 2019 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2019 embedded brains GmbH & Co. KG
*
* Copyright (C) 1989, 2017 On-Line Applications Research Corporation (OAR)
*
diff --git a/bsps/i386/pc386/start/bspidle.S b/bsps/i386/pc386/start/bspidle.S
index 740671afc1..1bd030f6b5 100644
--- a/bsps/i386/pc386/start/bspidle.S
+++ b/bsps/i386/pc386/start/bspidle.S
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* Idle Thread Body
*
diff --git a/bsps/i386/pc386/start/bspreset.c b/bsps/i386/pc386/start/bspreset.c
index 0fbcd0f201..93ebf23f82 100644
--- a/bsps/i386/pc386/start/bspreset.c
+++ b/bsps/i386/pc386/start/bspreset.c
@@ -1,10 +1,29 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
* COPYRIGHT (c) 1989-2017.
* On-Line Applications Research Corporation (OAR).
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
*/
#include <rtems.h>
diff --git a/bsps/i386/pc386/start/linkcmds b/bsps/i386/pc386/start/linkcmds
index 46a7af4cb9..3fe98edb6c 100644
--- a/bsps/i386/pc386/start/linkcmds
+++ b/bsps/i386/pc386/start/linkcmds
@@ -176,7 +176,7 @@ SECTIONS
KEEP (*(.dtors))
}
.jcr : { KEEP (*(.jcr)) }
- .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+ .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
.dynamic : { *(.dynamic) }
.got : { *(.got) }
. = DATA_SEGMENT_RELRO_END (12, .);
@@ -206,7 +206,7 @@ SECTIONS
. = ALIGN(32 / 8);
_end = .; PROVIDE (end = .);
.noinit (NOLOAD) : {
- *(.noinit*)
+ *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
}
.rtemsstack (NOLOAD) : {
*(SORT(.rtemsstack.*))
diff --git a/bsps/i386/pc386/start/realmode_int.c b/bsps/i386/pc386/start/realmode_int.c
index a6db9efe1b..16412b1c88 100644
--- a/bsps/i386/pc386/start/realmode_int.c
+++ b/bsps/i386/pc386/start/realmode_int.c
@@ -89,7 +89,16 @@ typedef struct {
*
* @note Struct members not necessarily used in C. This serves also as
* layout of memory and it is used within inline assembler.
+ *
+ * @note GCC complains that access to packed data may not be aligned and
+ * fair enough. The warning is:
+ *
+ * warning: taking address of packed member of 'struct <anonymous>' may
+ * result in an unaligned pointer value [-Waddress-of-packed-member]
+ *
+ * Disable the warning.
*/
+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
typedef struct {
/** spot for backup protected mode interrupt descriptor table register */
uint16_t idtr_lim_bkp;