summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/monitor/mon-part.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libmisc/monitor/mon-part.c')
-rw-r--r--cpukit/libmisc/monitor/mon-part.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/cpukit/libmisc/monitor/mon-part.c b/cpukit/libmisc/monitor/mon-part.c
index 18034cd58f..e049f4a6ab 100644
--- a/cpukit/libmisc/monitor/mon-part.c
+++ b/cpukit/libmisc/monitor/mon-part.c
@@ -1,5 +1,34 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @brief RTEMS Monitor partition support
+ */
+
/*
- * RTEMS Monitor partition support
+ * COPYRIGHT (c) 1989-2022. On-Line Applications Research Corporation (OAR).
+ *
+ * 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.
*/
#ifdef HAVE_CONFIG_H
@@ -22,8 +51,9 @@ rtems_monitor_part_canonical(
const Partition_Control *rtems_part = (const Partition_Control *) part_void;
canonical_part->attribute = rtems_part->attribute_set;
- canonical_part->start_addr = rtems_part->starting_address;
- canonical_part->length = rtems_part->length;
+ canonical_part->start_addr = rtems_part->base_address;
+ canonical_part->length = (uint32_t) ( (uintptr_t)
+ rtems_part->limit_address + 1 - (uintptr_t) rtems_part->base_address );
canonical_part->buf_size = rtems_part->buffer_size;
canonical_part->used_blocks = rtems_part->number_of_used_blocks;
}