Rev 625 | Rev 673 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 625 | Rev 668 | ||
|---|---|---|---|
| Line 46... | Line 46... | ||
| 46 | #include <debug.h> |
46 | #include <debug.h> |
| 47 | #include <symtab.h> |
47 | #include <symtab.h> |
| 48 | 48 | ||
| 49 | #include <mm/tlb.h> |
49 | #include <mm/tlb.h> |
| 50 | #include <arch/mm/tlb.h> |
50 | #include <arch/mm/tlb.h> |
| - | 51 | #include <mm/frame.h> |
|
| 51 | 52 | ||
| 52 | /** Data and methods for 'help' command. */ |
53 | /** Data and methods for 'help' command. */ |
| 53 | static int cmd_help(cmd_arg_t *argv); |
54 | static int cmd_help(cmd_arg_t *argv); |
| 54 | static cmd_info_t help_info = { |
55 | static cmd_info_t help_info = { |
| 55 | .name = "help", |
56 | .name = "help", |
| Line 117... | Line 118... | ||
| 117 | .argc = 2, |
118 | .argc = 2, |
| 118 | .argv = set4_argv |
119 | .argv = set4_argv |
| 119 | }; |
120 | }; |
| 120 | 121 | ||
| 121 | 122 | ||
| - | 123 | ||
| 122 | /** Data and methods for 'call0' command. */ |
124 | /** Data and methods for 'call0' command. */ |
| 123 | static char call0_buf[MAX_CMDLINE+1]; |
125 | static char call0_buf[MAX_CMDLINE+1]; |
| 124 | static char carg1_buf[MAX_CMDLINE+1]; |
126 | static char carg1_buf[MAX_CMDLINE+1]; |
| 125 | static char carg2_buf[MAX_CMDLINE+1]; |
127 | static char carg2_buf[MAX_CMDLINE+1]; |
| 126 | static char carg3_buf[MAX_CMDLINE+1]; |
128 | static char carg3_buf[MAX_CMDLINE+1]; |
| Line 239... | Line 241... | ||
| 239 | .func = cmd_ptlb, |
241 | .func = cmd_ptlb, |
| 240 | .argc = 0, |
242 | .argc = 0, |
| 241 | .argv = NULL |
243 | .argv = NULL |
| 242 | }; |
244 | }; |
| 243 | 245 | ||
| - | 246 | ||
| - | 247 | /** Data and methods for 'zones' command */ |
|
| - | 248 | static int cmd_zones(cmd_arg_t *argv); |
|
| - | 249 | static cmd_info_t zones_info = { |
|
| - | 250 | .name = "zones", |
|
| - | 251 | .description = "List of memory zones.", |
|
| - | 252 | .func = cmd_zones, |
|
| - | 253 | .argc = 0 |
|
| - | 254 | }; |
|
| - | 255 | ||
| - | 256 | /** Data and methods for 'zone' command */ |
|
| - | 257 | static int cmd_zone(cmd_arg_t *argv); |
|
| - | 258 | static char zone_buf[MAX_CMDLINE+1]; |
|
| - | 259 | static cmd_arg_t zone_argv = { |
|
| - | 260 | .type = ARG_TYPE_INT, |
|
| - | 261 | .buffer = zone_buf, |
|
| - | 262 | .len = sizeof(zone_buf) |
|
| - | 263 | }; |
|
| - | 264 | ||
| - | 265 | ||
| - | 266 | static cmd_info_t zone_info = { |
|
| - | 267 | .name = "zone", |
|
| - | 268 | .description = "Show memory zone structure.", |
|
| - | 269 | .func = cmd_zone, |
|
| - | 270 | .argc = 1, |
|
| - | 271 | .argv = &zone_argv |
|
| - | 272 | }; |
|
| - | 273 | ||
| - | 274 | ||
| - | 275 | ||
| 244 | /** Initialize command info structure. |
276 | /** Initialize command info structure. |
| 245 | * |
277 | * |
| 246 | * @param cmd Command info structure. |
278 | * @param cmd Command info structure. |
| 247 | * |
279 | * |
| 248 | */ |
280 | */ |
| Line 296... | Line 328... | ||
| 296 | panic("could not register command %s\n", halt_info.name); |
328 | panic("could not register command %s\n", halt_info.name); |
| 297 | 329 | ||
| 298 | cmd_initialize(&ptlb_info); |
330 | cmd_initialize(&ptlb_info); |
| 299 | if (!cmd_register(&ptlb_info)) |
331 | if (!cmd_register(&ptlb_info)) |
| 300 | panic("could not register command %s\n", ptlb_info.name); |
332 | panic("could not register command %s\n", ptlb_info.name); |
| - | 333 | ||
| - | 334 | cmd_initialize(&zones_info); |
|
| - | 335 | if (!cmd_register(&zones_info)) |
|
| - | 336 | panic("could not register command %s\n", zones_info.name); |
|
| - | 337 | ||
| - | 338 | cmd_initialize(&zone_info); |
|
| - | 339 | if (!cmd_register(&zone_info)) |
|
| - | 340 | panic("could not register command %s\n", zone_info.name); |
|
| - | 341 | ||
| - | 342 | ||
| 301 | } |
343 | } |
| 302 | 344 | ||
| 303 | 345 | ||
| 304 | /** List supported commands. |
346 | /** List supported commands. |
| 305 | * |
347 | * |
| Line 531... | Line 573... | ||
| 531 | 573 | ||
| 532 | } |
574 | } |
| 533 | 575 | ||
| 534 | return 1; |
576 | return 1; |
| 535 | } |
577 | } |
| - | 578 | ||
| - | 579 | ||
| - | 580 | int cmd_zones(cmd_arg_t * argv) { |
|
| - | 581 | printf("Zones listing not implemented\n"); |
|
| - | 582 | return 1; |
|
| - | 583 | } |
|
| - | 584 | int cmd_zone(cmd_arg_t * argv) { |
|
| - | 585 | printf("Zone details not implemented\n"); |
|
| - | 586 | return 1; |
|
| - | 587 | } |
|
| - | 588 | ||