RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

HAL_PhysInfo

Hardware Abstraction Layer
HAL entry points from RISC OS
» HAL_PhysInfo

HAL_PhysInfo

(HAL entry #105)
bool HAL_PhysInfo(enum op, void *table, physinfo_range_t *range)
Entry
op Operation to perform
table As required by the operation
range As required by the operation
Exit
- Returns TRUE if supported, otherwise FALSE

Use

This call is used to the physical memory arrangement table of the machine, as per SWI OS_Memory reason codes 6, 7, and 8. User software should always use the OS_Memory SWI instead of making this call directly.

Where required, physinfo_range_t is a structure defined as:

typedef struct physinfo_range_t
{
  uintptr_t  start;   /* Start physical address (inclusive) */
  uintptr_t  end;     /* End physical address (inclusive) */
}

If op is 0, table is taken to point to a size_t variable and is filled with the size of the physical arrangement table in bytes. The range parameter is unused.

If op is 1, table is table to point to an array of uint8_t at least as big as reported by operation 0. It is filled with the physical memory arrangement table, as per OS_Memory 7. However, it is the kernel’s responsibility to fill in information about the available RAM, so all RAM pages should be marked as (NotPresent OR NotAvailable). To aid the kernel in filling in the RAM map, the range structure is populated with the region of the physical memory map which might contain RAM. The kernel will then update the relevant areas of the table to indicate how much RAM is actually available.

If op is 2, the range structure is populated with the region containing hard ROM as required by OS_Memory 8. The table parameter is unused.

Information sources: Kernel.s.MemInfo, HAL.Tungsten.s.Boot in CVS
Revised on December 2, 2014 20:27:06 by Sprow (202)? (109.176.248.65)
Edit | Back in time (3 revisions) | See changes | History | Views: Print | Source | Linked from: HAL entry points from RISC OS, HAL entry points by number

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys